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

Popular posts from this blog

Proteus simulation 4x4 Matrix Keypad with Arduino and LCD screen

Digital Clock with Arduino and RTC Module and P10 LEDmatrix

Interfacing KY038 sound sensor with Raspberry pi Pico