diff --git a/CPX_Simon_Game/code.py b/CPX_Simon_Game/code.py index b8a3ee836..12f6ce0d7 100644 --- a/CPX_Simon_Game/code.py +++ b/CPX_Simon_Game/code.py @@ -59,18 +59,32 @@ def read_region(timeout=30): while time.time() - start_time < timeout: if cpx.touch_A1: val = PAD_REGION['A1'] + time.sleep(.3) + break elif cpx.touch_A2: val = PAD_REGION['A2'] + time.sleep(.3) + break elif cpx.touch_A3: val = PAD_REGION['A3'] + time.sleep(.3) + break elif cpx.touch_A4: val = PAD_REGION['A4'] + time.sleep(.3) + break elif cpx.touch_A5: val = PAD_REGION['A5'] + time.sleep(.3) + break elif cpx.touch_A6: val = PAD_REGION['A6'] + time.sleep(.3) + break elif cpx.touch_A7: val = PAD_REGION['A7'] + time.sleep(.3) + break return val def play_sequence(sequence): diff --git a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Hunter.py b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Hunter.py index dc9c7dea7..5a2f59670 100644 --- a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Hunter.py +++ b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Hunter.py @@ -31,7 +31,7 @@ # Try and decode them try: # Attempt to convert received pulses into numbers - received_code = tuple(decoder.decode_bits(pulses, debug=False)) + received_code = tuple(decoder.decode_bits(pulses)) except adafruit_irremote.IRNECRepeatException: # We got an unusual short code, probably a 'repeat' signal # print("NEC repeat!")