Seemingly out of the blue my Digole 128x64 Oled has started outputting 'oc4' in a box instead of spaces in text strings. In addition to that all variables printed to the screen are output as '?#+' or similar instead. The below:
Should be displaying as:
Menu 4/7
Return to start
Enabled
I get the same issue whatever sketch I upload, including the standard Digole sketches - does that point to it being an issue with the screen driver firmware maybe? It's puzzling that variables cause a problem but hard coded text strings work fine...
Also, lines, shapes, animations etc all work fine too, the problem is limited to variables and spaces.
I emailed Digole and they said to try uploading a stock sketch - and if that didn't work (which it didn't), to return the screen for a replacement. There must be a way to reset the screen to its original settings, but I'm not sure how that's done?
Any thoughts and suggestions welcome!
Cheers
Richard
I'm using the screen in SPI mode and calling high level functions (https://www.digole.com/images/file/Tech_Data/Digole_Serial_Display_Adapter-Manual.pdf) rather than talking to the screen directly. It's all quite abstracted, which is great when it works, but seems hard to debug when it doesn't....I don't really know what's running on that chip or how to find out if there's anything wrong.
I've tried the sketch with multiple boards and several other sketches, short and long, including the examples from Digole. So unless I'm wrong, I think I've ruled out my hardware and my code. I don't think it's an out of memory problem as even very short sketches exhibit the same problem.
I've been talking a bit more with Digiole about it today and there's one suggestion that it might be down to the default font being corrupted. I've tried switching to one of the other preloaded fonts in my sketch but that doesn't appear to work.
It's puzzling that variables cause a problem but hard coded text strings work fine...
Must be in their firmware then if 0x20 bytes in text strings work then the display
and font must be fine.
BTW The code you give has a hard coded "Return to start" string, yet the picture
shows a corrupted version of that string on the display. So is that statement above
really the case?