from machine import Pin, I2C
import ssd1306
import time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
def main():
while True:
oled.fill(0)
oled.text('Hola,Programacion 2', 10, 10)
for i in range(10):
oled.fill(0)
oled.text('Programacion 2', 10, 10)
oled.text(str(i), 60, 50)
oled.show()
time.sleep(1)
time.sleep(2)
if __name__ == '__main__':
main()