Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from machine import Pin
- led = Pin(15, Pin.OUT)
- button = Pin(16, Pin.IN, Pin.PULL_DOWN)
- while True:
- if button.value() == 1:
- led.on()
- else: led.off()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement