Micropython for has no SoftI2C
2025-06-07
It has no SoftI2C, so change
display = ssd1306.SSD1306_I2C(128, 64, SoftI2C(sda=Pin(20), scl=Pin(21)))
to
import time
from machine import Pin, I2C, SoftI2C
import ssd1306
i2c = I2C(1) # Create I2C object
display = ssd1306.SSD1306_I2C(128, 64, i2c) # Pass I2C object
display.fill(0)
display.text("Hello, World", 0, 0)
display.show()
time.sleep(100)