pimoroni-pico-rp2350/examples/plasma_2350/buttons.py
Phil Howard c9f5a28cd4 CI: Refactor to match our other tooling.
Retarget pimoroni-pico to feature/picovector2-and-layers.
2025-03-05 12:31:54 +00: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)