electronics
Hardware- 0 Devlogs
- 0 Total hours
simple relay with lcd display
here is code:
from machine import Pin
import time
from pico_i2c_lcd import I2cLcd
i2c = machine.I2C(0, sda=machine.Pin(8), scl=machine.Pin(9), freq=400000)
I2C_ADDR = 0x27
lcd = I2cLcd(i2c, 0x27, 2, 16)
I2C_ADDR = 0x27
lcd = I2cLcd(i2c, 0x27, 2, 16)
a = Pin(0,Pin.OUT)
while True:
a.value(1)
lcd.putstr(‘on’)
time.sleep(1)
lcd.clear()
a.value(0)
lcd.putstr(‘off’)
time.sleep(1)
lcd.clear()