Page 1 of 1

corrupted display - signal noise?

Posted: Thu Sep 15, 2016 1:40 pm
by nickwest
Hi all,

I see these bands of coloured "static" at the tops of my images when I display .BMPs. I'm updating the display about every second or so, and the first few updates are fine, then the noise appears, then a couple of frames later the arduino+screen hangs on the noisy image and has to be reset.

Right now I have the OLED connected to a shield by short (5cm) wires, using a Freetronics "Eleven" board (Arduino Uno compatible). Arduino IDE 1:1.0.5 IDE running under Linux mint.

I do plan to do away with the wires all together and make a little custom shield.... but before I commit to that I would like to be sure that cable noise really IS the problem!

Has anyone seen similar glitches before? I thought about using inline resistors (let's say 1K ohm) in each of the signal wires - could this help? Other threads have mentioned grounding pin 4 of the OLED display which doesn't seem to make a difference either way in my case.

Thanks for the help and let me know if you need any more information.

Re: corrupted display - signal noise?

Posted: Thu Oct 06, 2016 9:03 pm
by nickwest
Nobody has ever seen this problem before? Any suggestions?

I can't see any pattern to the issue - the number of frames I get before the image corruption and eventual freezing doesn't seem consistent. I'll try sending simple data straight from the arduino to the screen, to see if taking the SD card right out of the picture can solve the problem...

Re: corrupted display - signal noise?

Posted: Sat Dec 10, 2016 7:56 pm
by nickwest
After some more testing, it looks like I was having a problem with using up RAM.

I was using the example code to display a .BMP. It looks like the issue is with this part:

Code: Select all

  BMP_Status result = oled.displayBMP(image, 0, 0);
if(result != BMP_OK) {
   Serial.print("Error loading BMP ");
   result = 0;
When I comment this out, the memory leak goes away. I also needed to explicitly say image.close() after displaying each image. If I don't do this, I lose 31 bytes of RAM each time I display an image.

So, the "noise" in the display doesn't seem to have been related to electrical noise at all. Instead, it was a sign that some memory somewhere was being overwritten without me knowing it.

I hope that makes sense. I found lots of good info about Arduino memory at and