In my code you can see i2c.scan(). That is just printing an empty list.
And the program is crashing out with OSError: [Errno 110] ETIMEDOUT.
I am a bit stuck to where I can debug and find out what's wrong? Any ideas?
Code: Select all
from machine import Pin, I2C
import ssd1306
import time
# Sanity check blink on board led Default 2
LED_PIN = 2 # On board led
led = Pin(LED_PIN, Pin.OUT)
def blink(times=2):
for i in range(times):
led.off()
time.sleep(0.25)
led.on()
time.sleep(0.25)
blink()
i2c = I2C(scl=Pin(5), sda=Pin(4))
i2c.scan() # Print empty list
display = ssd1306.SSD1306_I2C(64, 48, i2c)
display.fill(0)
temp = "Boot2"
display.text(temp,10,10)
display.show()
time.sleep(2)
i = 0
while True:
i+=1
display.fill(0)
display.text("{}".format(i),10,10)
display.show()
print(i)
time.sleep(1)