TTP233 Touch pad with raspberry pi pico
Micropython code
from machine import Pin
import time
Touch_pad = machine.Pin(16,Pin.IN,Pin.PULL_UP)#connect touch pad sensor in between GPIO16 and 3.3volt out of arspberry pi pico.
led = Pin(15,Pin.OUT)
Relay = Pin(17,Pin.OUT)
while True:
if Touch_pad.value()==1:
print("Touched")
Relay.toggle()
led.toggle()
time.sleep(0.5)
Comments
Post a Comment