Garbled OLED display

I was testing the SD1306 MicroPython library for a small OLED display I just received. It uses the I2C bus and it is 128x64 pixels monochrome. I have used a smaller one before with that library and it seemed a no-brainer.  

Unfortunately, I was not sure the unit was operational as it was brand-new and could be defective. I could only see the text I sent to the display for an instant and then only a fixed garbled background that was impossible to remove.

I searched away until I found a Reddit post that summarized my problem exactly: It turned out very similar displays are sold, often without the seller specifying what model is being sold. So the OLED display SH1106 was the one I received and, if you use the SD1306 library with it, you get a garbled display. 

Once I reverted to the right library, everything worked as expected. As usual, I would love not to make these mistakes, but this is a reminder about the importance of making sure what part you are buying EXACTLY!! 

Comments

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor

Importing OpenSCAD designs into Onshape