From bd833b0c64b578e1d49a0d9402cf5bf925e6a9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 12 Aug 2022 02:10:21 +0200 Subject: [PATCH] added better print out and cooldown for rotaition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- code.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code.py b/code.py index 87fabee..99c653d 100644 --- a/code.py +++ b/code.py @@ -24,5 +24,9 @@ while True: else: if previousValue != clkPin.value: if clkPin.value == False: - print("1x"+str(dtPin.value)) + if dtPin.value == False: + print("1x1") + elif dtPin.value == True: + print("1x0") + time.sleep(0.1) previousValue = clkPin.value