kopia lustrzana https://github.com/peterhinch/micropython-nano-gui
Create ssd1306_i2c_esp32.py
rodzic
7ed8f7d627
commit
74fbf3a3f7
|
@ -0,0 +1,12 @@
|
|||
from machine import Pin, SoftI2C
|
||||
import gc
|
||||
|
||||
from drivers.ssd1306.ssd1306 import SSD1306_I2C as SSD
|
||||
|
||||
# ESP32 Pin assignment
|
||||
i2c = SoftI2C(scl=Pin(22), sda=Pin(21))
|
||||
|
||||
oled_width = 128
|
||||
oled_height = 64
|
||||
gc.collect() # Precaution before instantiating framebuf
|
||||
ssd = SSD(oled_width, oled_height, i2c)
|
Ładowanie…
Reference in New Issue