I’m using the Adafruit_SSD1306 128x32 display and have noticed over time that an artifact appears at the bottom of the screen over time. Normally my display shows the following:
SENSORS
FOUND
10
Over time it looks something like this:
SENSORS
FOUND
10
It is almost like the top row of pixels for the word SENSORS has ended up in the bottom row of the display.
My code within the loop to write to the display looks like this:
@sensorcheck, since you are setting the cursor before “printing” each item, you might want to use print() instead of println(). BTW, the “different” display examples don’t seem different. You may want to post pictures of the screen instead.
It behaves like vertical drift which makes no sense since each iteration clears and then reprints the display. I will use print instead of println and report back.
BTW, nice thing about this pin assignment with the display is that the pins align perfectly allowing for a female header on the breadboard and a male header on the display - no wiring.
The “print” appears to have solved the issue - so far looking good!
@sensorcheck, a) what Particle device are you using? b) you should not be powering the OLED from GPIO pins if using Gen3 devices. If you are using a Photon, this is possible since the GPIO max current is higher.
As peekay123 pointed out, are you really powering the display directly from the GPIO pins, not using a MOSFET or other transistor?
A SSD1306 can draw up to 25 mA and the pin drive strength on the nRF52840 (Boron) is 2 mA. Even in high drive mode it’s 9 mA, not enough to drive the display reliably.
Hi @rickkas7, the voltage was a match and the pin alignment perfect. Thank you both for pointing out the draw mismatch. That said, do we think this is related to the artifact at the bottom of the display?
Done. I also set display.dim(true) - not sure if this will lower power consumption given the simple text use case. Finally (and I think this speaks to the original symptom of the top line of pixels “drifting/wrapping”) I changed the first setCursor to start on row 1 instead of row 0. So far no artifacts!