First commit

This commit is contained in:
2026-07-30 16:19:15 -04:00
parent fbc5b3d4d3
commit d51ad8db38
12 changed files with 888 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from utime import sleep
from machine import Pin
class Button:
def __init__(self, pin):
self.pin = Pin(pin, mode=Pin.IN, pull=Pin.PULL_UP)
def is_pressed(self):
return self.pin.value() == 0
def wait_button_press(self):
while self.is_pressed() == False:
sleep(0.01)
return