from machine import Pin, I2C
import ssd1306
from time import sleep
# Pines ESP32
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
# Configuración OLED
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
# mensaje
oled.text('Programacion 2', 10, 10)
oled.show()
sleep(1)
oled.fill(0)#Limpiar pantalla
oled.show()
sleep(1)
# Ciclo del 0 al 9
for i in range(10):
oled.fill(0)
oled.text('Hola, Camilo', 10, 10)
oled.text('{}'.format(i), 60, 30)
oled.show()
sleep(1)