Skip to content

Instantly share code, notes, and snippets.

@tgfuellner
Created May 26, 2016 07:29
Show Gist options
  • Select an option

  • Save tgfuellner/7bb31d05613cffba9229dc972d32186e to your computer and use it in GitHub Desktop.

Select an option

Save tgfuellner/7bb31d05613cffba9229dc972d32186e to your computer and use it in GitHub Desktop.
Oled with micropython on wemos d1 mini
import ssd1306
from machine import I2C, Pin
i2c = I2C(sda=Pin(4), scl=Pin(5))
display = ssd1306.SSD1306_I2C(64, i2c)
display.fill(0)
display.text('Hallo',20,20)
display.show()
@garybake

Copy link
Copy Markdown

Thank you so much. I've been looking for an example of this for ages.
Note that for the latest 1.8.2 upython release you need to change line 5 to display = ssd1306.SSD1306_I2C(64, 48, i2c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment