Page 1 of 1

Oled toasted by unplug usb?

Posted: Sun Dec 29, 2019 8:47 am
by MicroNinja
I had my oled working fine at first, but then I unplugged the usb cable to my esp8266.
Next thing I got an Errno110 when running the script again which i understand is that it cannot communicate with the display?

Code: Select all

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ssd1306.py", line 117, in __init__
File "ssd1306.py", line 37, in __init__
File "ssd1306.py", line 62, in init_display
File "ssd1306.py", line 122, in write_cmd
OSError: [Errno 110] ETIMEDOUT
From my repl i tried to init the display to see what happened. After scanning the i2c it return an empty list. So i think the oled cannot be found anymore. But i dont know why? I have not touched the wires compared to when it was working and I have played around to make sure they are properly connected on my breadboard which I am testing it out on. Did the display get fried when i unplugged the cable!? Or is there any other way I can check if it is still working?

Code: Select all

from machine import Pin, I2C
import ssd1306

i2c = I2C(scl=Pin(5), sda=Pin(4))
display = ssd1306.SSD1306_I2C(64, 48, i2c)
i2c.scan()

Re: Oled toasted by unplug usb?

Posted: Sun Dec 29, 2019 9:19 am
by MicroNinja
After a lot of fiddling around it is working again. Note the fiddle did not really result in any changes. Either a cable was loose or something else was hanging that I am unaware of?

How do i clear the screen when exit the script? If exit of abort my script the last value is still showing on the display. I have to pull the power to blank the screen. Is there a way I can do it without plugging the cable?