SSD1306 display doesn't work #10605
Replies: 7 comments 4 replies
-
It looks like a basic communication problem. Call |
Beta Was this translation helpful? Give feedback.
-
This is hard to tell without seeing the error message you got. However, I would assume you have some kind of connection problem. |
Beta Was this translation helpful? Give feedback.
-
I have an i2c ssd1306 oled display and can confirm that I have the same problem. The display works on esp32, esp32s2 but not esp8266. I have made a copy of "ssd1306.py" to "oled.py" so that I can put in some debugging messages. The ssd1306 module reports ENODEV during init: MicroPython v1.22.0-preview.246.g4365edb81.dirty on 2024-01-15; WEMOS D1 MINI 4MB with ESP8266
>>>
>>> from machine import Pin, SoftI2C
>>> i2c = SoftI2C(sda=Pin(4), scl=Pin(5))
>>> i2c.scan()
[60]
>>> import oled
>>> display = oled.SSD1306_I2C(128, 64, i2c)
Write CMD: 60 bytearray(b'\x80\xae')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "oled.py", line 119, in __init__
File "oled.py", line 38, in __init__
File "oled.py", line 75, in init_display
File "oled.py", line 125, in write_cmd
OSError: [Errno 19] ENODEV
>>> hex(60)
'0x3c'
>>> i2c.scan()
[60] |
Beta Was this translation helpful? Give feedback.
-
screen = ssd1306.SSD1306_I2C(128, 32, i2c) |
Beta Was this translation helpful? Give feedback.
-
I experienced this same error with the esp8266 board with builtin ssd1306 display that I have. The I2C pins are labeled on the underside of the board as
the display works fine for me when initialized as |
Beta Was this translation helpful? Give feedback.
-
The I2C address specified in the ssd1306 library may not match the address of your display. Run the I2C scanner to check the connected devices and their addresses.If the I2C scanner shows an address different from 0x3C, update the 'addr' parameter. You can also check the display part of this tutorial for further cross-checking. https://www.pcbway.com/project/shareproject/Raspberry_Pico_with_Ultrasonic_Sensor_and_SSD1306.html |
Beta Was this translation helpful? Give feedback.
-
The problem I found was the ESP8266 I was using had the power pins miss labelled |
Beta Was this translation helpful? Give feedback.
-
I have a 128x32 display, and this is what I typed into the REPL:
And after that it shows this error:
What's the solution to this problem?
Beta Was this translation helpful? Give feedback.
All reactions