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()
#Linea de al medio Vertical
for i in range(64):
y=55
x=0
while y>=32 and x<=128:
y=y-1
oled.text("*",70,y)
oled.show()
#Linea de al medio Horizontal
for i in range(64):
y=0
x=70
while y<=64 and x>=52:
x=x-1
oled.text("*",x,32)
oled.show()
"""
#Logica de Palabra
oled.text("Cristian G",10 ,10)
oled.show()
"""
"""
#Logica Linea Vertical
for i in range(0,22,8):
oled.text("x",i*2,i)
oled.show()
"""
""""
for i in range(0,63,8):
oled.text("x",i,)
oled.show()
#Logica Linea Vertical
#for i in range(0,63,8):
oled.text("x",0,i)
#oled.show()
#Logica Linea en Horizontal
#for i in range(0,127,8):
oled.text("x",i,0)
#oled.show()
#Logica de Palabra
#oled.text("Hola Mundo",10,10)
#oled.show()
"""