pimoroni-pico-rp2350/examples/pico_plus_2/button.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

14 lines
242 B
Python

from machine import Pin
# Setup the LED and Button pin.
led = Pin(25, Pin.OUT)
button = Pin(45, Pin.IN)
# Light the LED when the button is presed!
while True:
if button.value() == 0:
led.value(1)
else:
led.value(0)