from machine import Pin
from machine import I2C
import ssd1306
#declarar objeto
i2c= I2C(0,scl=Pin(22),sda=Pin(21))
oled_width=128
oled_heigth=64
oled= ssd1306.SSD1306_I2C(oled_width,oled_heigth,i2c)
#Linea incial Vertical
for i in range(64):
y=20
x=0
while y<=44 and x<=128:
y=y+1
oled.text("*",32,y)
oled.show()
# Linea diagonal abajo
for i in range(64):
y=44
x=32
while y<=55 and x<=48:
y=y+1
x=x+1
oled.text("*",x,y)
oled.show()
#Linea diagonal arriba
for i in range(64):
y=20
x=32
while y<=64 and x<=48:
y=y-1
x=x+1
oled.text("*",x,y)
oled.show()
#Linea horizontal abajo
for i in range(64):
y=63
x=48
while y<=64 and x<=70:
x=x+1
oled.text("*",x,55)
oled.show()
#Linea horizontal arriba
for i in range(64):
y=0
x=48
while y<=64 and x<=70:
x=x+1
oled.text("*",x,3)
oled.show()Loading
esp32-devkit-c-v4
esp32-devkit-c-v4
Loading
ssd1306
ssd1306