From a5547b3b45c4458d6d8cf3dde4834db4bf613360 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 17 Jun 2021 19:51:13 +1200 Subject: [PATCH] Add button example --- button/button.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 button/button.py diff --git a/button/button.py b/button/button.py new file mode 100644 index 0000000..a7e1010 --- /dev/null +++ b/button/button.py @@ -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) +