Adafruit SSD1306 OLED 128x64 Display Won't Respond

Hello,

I’ve looked through the forum for similar issues and haven’t found this exact problem, but if I missed something, my apologies.

I’m trying to get an Adafruit 128x64 OLED (using SSD1306 breakout) to work with a Sparkfun Pro Micro (QWIIC version). If I upload the example file from the Adafruit SSD1306 library using the Arduino IDE, the display works as expected. When I upload the same code (after addressing all of the declarations issues, etc., when moving from the Arduino IDE) from CLion using PIO the code compiles and uploads fine, but the display won’t update. It appears that the Pro Micro is not communicating with it. (Indeed, if I upload using PIO immediately after uploading via the Arduino IDE, whatever was in the buffer on the breakout board continues displaying.)

I’ve checked that I have the most up to date libraries, and I’m just at a total loss. Anyone struggle with this and figure it out?

Can you show the exact platformio.ini and code that you’re uploading to the board here, both for PlatformIO and Arduino IDE (if they’re different)? How is the wireup between the board and the board, just I2C or more control lines?

This morning as I simplified the code in CLion to remove anything extraneous from the project I’m working on, I was able to get the example code from Adafruit to work through PIO. Clearly, something else in my project was interfering; now comes the long slog to find it. I’ll update this thread to let folks know in case anyone is curious.

Well, shoot. The root cause was, of all things, a badly formed array definition in a custom class that didn’t throw any compile time errors. Not sure why this caused things to hang the way they did–other parts of the program worked just fine, which is how this went unnoticed previously. All fixed now, though. Sorry to take up your time, folks!