Create ssd1306_i2c_esp32.py

pull/46/head
Angel Toloza 2023-01-13 23:21:22 -03:00
rodzic 7ed8f7d627
commit 74fbf3a3f7
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -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)