Last active
June 3, 2016 22:32
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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