128x64 OLED screen not working, displays noise

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
maxstahl
 
Posts: 12
Joined: Sun Dec 02, 2018 9:09 pm

128x64 OLED screen not working, displays noise

Post by maxstahl »

Ok so this is a really weird problem. I've tried both the `OLED_featherwing` and `ssd1306_128x64_i2c` examples with the 128x64 OLED screen I bought, tried different I2C addresses and different settings, but nothing seems to work. The best I can get is the situation attached: the top half of the screen is blank and the bottom half is filled with noise. Somewhat interestingly, the noise pattern is identical when running those two examples. I've tried with an ESP32 feather, and Arduino UNO board, and an Arduino Nano Every, all connected via I2C, but the result is the same every time. Serial output indicates the sketch makes it past the display initializations and everything, they just don't actually do anything.

I feel like I've tried just about everything I can think of short of trying a different Arduino or ESP-IDF library for communicating with the SSD1306 and rewriting the example code to use that instead.

Would really appreciate some more troubleshooting suggestions or a process to return the screen if I can't get it working.

User avatar
dastels
 
Posts: 15655
Joined: Tue Oct 20, 2015 3:22 pm

Re: 128x64 OLED screen not working, displays noise

Post by dastels »

Try making sure the display board is getting reset either "manually" using a digital output from the controller board, or by connecting to the MCU's reset.

It would also help if you identified exactly what display board you have.

Dave

User avatar
maxstahl
 
Posts: 12
Joined: Sun Dec 02, 2018 9:09 pm

Re: 128x64 OLED screen not working, displays noise

Post by maxstahl »

OK so I have two updates: 1) I forgot to actually attach a photo, and 2) I tried with someone else's library (accessible at https://github.com/nopnop2002/esp-idf-s ... ain/main.c) and also photographed the result.

It's interesting that the third party example code seems to "work" in that it does display the stuff it's supposed to, but it's rotated 90°. Again, no error codes so the SSD1306 is presumably OK with the commands being sent to it, but it's just not doing the right thing with them. What's also interesting is that on first run, it displayed text in the lower-right quadrant of the screen but the lower-left was still filled with noise like with the Adafruit example code. Only when I set `CONFIG_FLIP` in that project did I get the result attached. Very strange!

I'm stuck, I think, so any help would greatly be appreciated. I've checked the connections, the I2C address, everything, but nothing seems off.
Attachments
ESP32 feather running 3rd party example.
ESP32 feather running 3rd party example.
IMG_2849.jpeg (69.09 KiB) Viewed 819 times
Arduino NANO Every running Adafruit example code.
Arduino NANO Every running Adafruit example code.
IMG_2848.jpeg (39.02 KiB) Viewed 819 times

User avatar
maxstahl
 
Posts: 12
Joined: Sun Dec 02, 2018 9:09 pm

Re: 128x64 OLED screen not working, displays noise

Post by maxstahl »

dastels wrote: Mon Sep 26, 2022 3:51 pm Try making sure the display board is getting reset either "manually" using a digital output from the controller board, or by connecting to the MCU's reset.

It would also help if you identified exactly what display board you have.

Dave
Thanks for your reply, Dave! I didn't see it when I wrote that last message.

I configured the GPIO pin for reset as -1 and have the MCU and OLED display's reset pins connected (and I assume they're connected for the OLED featherwing). The particular display I have is this one from the store: https://www.adafruit.com/product/4650. On a side note about that particular board: the example code and documentation all say the I2C address should be 0x3D but the board itself says 0x3C and that's the address that works.

User avatar
dastels
 
Posts: 15655
Joined: Tue Oct 20, 2015 3:22 pm

Re: 128x64 OLED screen not working, displays noise

Post by dastels »

You've worked through the tutorial guide? https://learn.adafruit.com/adafruit-128 ... eatherwing

Dave

User avatar
maxstahl
 
Posts: 12
Joined: Sun Dec 02, 2018 9:09 pm

Re: 128x64 OLED screen not working, displays noise

Post by maxstahl »

🤦🏻🤦🏻🤦🏻 LOL ok that explains a lot: I couldn't find the tutorial for the 128x64 OLED so I had somehow ended up on the 128x32 one, since I've seen the library supports both. Oops.

Ok so I'm using the "OLED_featherwing" example from the Adafruit_SH110x library this time, and it's not compiling still. I haven't tried yet with ESP-IDF but in Arduino IDE, with that library, Adafruit GFX, and FreeRTOS installed, I get this error:

Code: Select all

...
In file included from /Users/max/Documents/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/random:40:0,
                 from /Users/max/Documents/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:66,
                 from /Users/max/Documents/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62,
                 from /Users/max/Documents/Arduino/hardware/espressif/esp32/cores/esp32/Arduino.h:162,
                 from /private/var/folders/x2/9_qm3twd379fwdkg_0mzwls80000gn/T/arduino-sketch-0F538A9496ED08F651B17F88EC29D4DE/sketch/OLED_featherwing.ino.cpp:1:
/Users/max/Documents/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/string:53:34: fatal error: bits/basic_string.tcc: No such file or directory
compilation terminated.
Alternatives for bits/basic_string.tcc: []
ResolveLibrary(bits/basic_string.tcc)
  -> candidates: []

exit status 1

Compilation error: exit status 1
Later: I managed to get the featherwing example to compile with ESP-IDF after cloning a buncha repos into the "components/" directory, but it still doesn't work. This time, nothing shows up on the display but I see both the "OLED begun" and "Button test" serial output.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”