Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (10 sloc) 231 Bytes
import time
import board
from digitalio import DigitalInOut, Direction
pad_pin = board.D23
pad = DigitalInOut(pad_pin)
pad.direction = Direction.INPUT
while True:
if pad.value:
print("pressed")
time.sleep(0.1)
You can’t perform that action at this time.