docs/esp8266: Add SSD1306 to quickref and tutorial.
This commit is contained in:
committed by
Damien George
parent
d43ed087ae
commit
97fee47716
@@ -424,6 +424,20 @@ The DHT driver is implemented in software and works on all pins::
|
||||
d.temperature() # eg. 23.6 (°C)
|
||||
d.humidity() # eg. 41.3 (% RH)
|
||||
|
||||
SSD1306 driver
|
||||
--------------
|
||||
|
||||
Driver for SSD1306 monochrome OLED displays. See tutorial :ref:`ssd1306`. ::
|
||||
|
||||
from machine import Pin, I2C
|
||||
import ssd1306
|
||||
|
||||
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
|
||||
display = ssd1306.SSD1306_I2C(128, 64, i2c)
|
||||
|
||||
display.text('Hello World', 0, 0, 1)
|
||||
display.show()
|
||||
|
||||
WebREPL (web browser interactive prompt)
|
||||
----------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user