pimoroni-pico-rp2350/examples/plasma_2350/buttons.py
Phil Howard af670449c0 CI: Refactor to match our other tooling.
Retarget pimoroni-pico to feature/picovector2-and-layers.
2025-04-14 17:06:58 +01:00

17 lines
338 B
Python

import time
import machine
# Setup for the button pins
user_button = machine.Pin(22, machine.Pin.IN)
a_button = machine.Pin(12, machine.Pin.IN, machine.Pin.PULL_UP)
while True:
if user_button.value() == 0:
print("USER BUTTON PRESSED!")
if a_button.value() == 0:
print("A BUTTON PRESSED!")
time.sleep(0.2)