I think I must have tried a dozen or so libraries for the I2C display on the pad, and those that do display the text correctly have the same or worse issues. Many simply didn't work at all, some required rebuilding the code, then didn't work. So I'm pretty sure I have the best library for the job, but I don't have the skills to rebuild the library or to diagnose the issue any further. It's so close to being perfect it makes it even more frustrating. If you do random combos for the first half a dozen commands it then will allow any combo to be used and works flawlessly. Its driving me mad!
I have rewritten the pad code a couple of times and managed to get the problems to change slightly, but nothing seems to solve it. So I am convinced the code is fine and the library is to blame. But I could still be wrong. I had pinned my hopes on the Nano being the issue, but I swapped it for a mega tonight, and that has exactly the same problem, so it isn't RAM related, or related to the Arduino type. :(
The issue is either in the Wire or LiquidCrystal_I2C libraries, but the Arduino site link is dead for the latest library.
If I short the 2 I2C lines it causes exactly the same issue.
The good news is that it only freezes when the screen changes, so driving isn't an issue, only running the button presses. But as I want to be able to run scripts while driving I need to find a way round it.
So I have decided to take a different approach. I am going to persist with the current code, but add a button to reset the pad, and also add some code to the droid to stop it if it loses connection. This combined with a shorter setup on the pad should mean its usable, and allow a little more faith that it wont run off and destroy stuff. :)
But I will keep an eye out for updated libraries and see if I can solve it further down the line, and maybe look at alternative screen options and see if they are any better. Its really disappointing, it's so close to an ideal solution.
So a very frustrating couple of evenings work, loads of effort and zero progress. :(