File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Circuit_Playground_Express_IR_Treasure_Hunt Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -59,18 +59,32 @@ def read_region(timeout=30):
59
59
while time .time () - start_time < timeout :
60
60
if cpx .touch_A1 :
61
61
val = PAD_REGION ['A1' ]
62
+ time .sleep (.3 )
63
+ break
62
64
elif cpx .touch_A2 :
63
65
val = PAD_REGION ['A2' ]
66
+ time .sleep (.3 )
67
+ break
64
68
elif cpx .touch_A3 :
65
69
val = PAD_REGION ['A3' ]
70
+ time .sleep (.3 )
71
+ break
66
72
elif cpx .touch_A4 :
67
73
val = PAD_REGION ['A4' ]
74
+ time .sleep (.3 )
75
+ break
68
76
elif cpx .touch_A5 :
69
77
val = PAD_REGION ['A5' ]
78
+ time .sleep (.3 )
79
+ break
70
80
elif cpx .touch_A6 :
71
81
val = PAD_REGION ['A6' ]
82
+ time .sleep (.3 )
83
+ break
72
84
elif cpx .touch_A7 :
73
85
val = PAD_REGION ['A7' ]
86
+ time .sleep (.3 )
87
+ break
74
88
return val
75
89
76
90
def play_sequence (sequence ):
Original file line number Diff line number Diff line change 31
31
# Try and decode them
32
32
try :
33
33
# Attempt to convert received pulses into numbers
34
- received_code = tuple (decoder .decode_bits (pulses , debug = False ))
34
+ received_code = tuple (decoder .decode_bits (pulses ))
35
35
except adafruit_irremote .IRNECRepeatException :
36
36
# We got an unusual short code, probably a 'repeat' signal
37
37
# print("NEC repeat!")
You can’t perform that action at this time.
0 commit comments