Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from machine import Pin, I2C, ADC
- import ssd1306
- from time import sleep
- #Configurar interfaz I2C a puerto 1, pines
- # sda GPIO21, scl GPIO22, direccion por defecto 0x3C
- i2c = I2C(-1, sda=Pin(21), scl=Pin(22))
- display = ssd1306.SSD1306_I2C(128, 64, i2c)
- def main():
- #limpiar la LCD
- display.fill(0)
- #escribir
- display.text('Bienvenidos al', 12, 0,20)#posicion x, posicion y
- display.text('Sistema TecPro', 10, 15,20)
- display.text('Nivel J', 40, 30,20)
- #mostrar en lcd
- display.show()
- #tasa de actualizacion
- sleep(0.1)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement