Add button example

This commit is contained in:
Jimmy 2021-06-17 19:51:13 +12:00
parent 98fd5f6742
commit a5547b3b45
1 changed files with 10 additions and 0 deletions

10
button/button.py Normal file
View File

@ -0,0 +1,10 @@
from machine import Pin
from time import sleep
button = Pin(13, Pin.IN) #D7
button2 = Pin(14, Pin.IN) #d5
while True:
print(button.value(), button2.value())
sleep(1)