Skip to content

Instantly share code, notes, and snippets.

@jonathlt
Last active June 3, 2016 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathlt/2a5efd85a9f55ebdc2e17cbff99d7676 to your computer and use it in GitHub Desktop.
Save jonathlt/2a5efd85a9f55ebdc2e17cbff99d7676 to your computer and use it in GitHub Desktop.
Display text on an SSD1306 display driven by an ESP8266 running Micropython. Must be using the latest port (esp8266-2016-06-03-v1.8.1.bin kickstarter or build from source)
"""
Script to display text on an ssd1306 module
connected to esp8266 running micropython
SSD1306 ESP8266
VCC ---------------3V3
GND ---------------GND
SCL ---------------D1 (Pin4)
SDA ---------------D2 (Pin5)
"""
from machine import I2C, Pin
from ssd1306 import SSD1306_I2C as display
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=400000)
d = display(32, i2c)
d.text("Hello World!", 0, 0)
d.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment