You are browsing as a guest. Sign up (or log in) to start making projects!

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()

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…