From 178a1a1b22be5ab1f27a02eaf8c4408a544d03c8 Mon Sep 17 00:00:00 2001 From: bradanlane Date: Sun, 5 May 2024 09:55:52 -0400 Subject: [PATCH 1/6] correct one and zero list values the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data. --- STEMMA_IR_LED_Emitter/code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STEMMA_IR_LED_Emitter/code.py b/STEMMA_IR_LED_Emitter/code.py index 599daab27..e3e3a491a 100644 --- a/STEMMA_IR_LED_Emitter/code.py +++ b/STEMMA_IR_LED_Emitter/code.py @@ -11,7 +11,7 @@ pulseout = pulseio.PulseOut(board.D5, frequency=38000, duty_cycle=2**15) # Create an encoder that will take numbers and turn them into NEC IR pulses emitter = adafruit_irremote.GenericTransmit( - header=[9500, 4500], one=[550, 550], zero=[550, 1700], trail=0 + header=[9500, 4500], one=[550, 1700], zero=[550, 550], trail=0 ) # count variable From f43b59dc42ae0e4b51b3fb5f5acb268b12c6b44a Mon Sep 17 00:00:00 2001 From: bradanlane Date: Sun, 5 May 2024 10:00:19 -0400 Subject: [PATCH 2/6] correct one and zero list values the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data. --- Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py b/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py index 22dc97e00..b29c63957 100644 --- a/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py +++ b/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py @@ -11,8 +11,8 @@ # Create a 'pulseio' output, to send infrared signals on the IR transmitter @ 38KHz pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15) # Create an encoder that will take numbers and turn them into NEC IR pulses -encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], one=[550, 550], - zero=[550, 1700], trail=0) +encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], one=[550, 1700], + zero=[550, 550], trail=0) while True: if cpx.button_a: From c2c4c9160e86014fc7a06afbc065c429083de474 Mon Sep 17 00:00:00 2001 From: bradanlane Date: Sun, 5 May 2024 10:05:26 -0400 Subject: [PATCH 3/6] correct one and zero list values the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data. --- .../CPX_Treasure/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py index e3e304aad..264b3e694 100644 --- a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py +++ b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py @@ -20,8 +20,8 @@ # Create an encoder that will take numbers and turn them into IR pulses encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], - one=[550, 550], - zero=[550, 1700], + one=[550, 1700], + zero=[550, 550], trail=0) while True: From 465fe5a399fed21185b50a02f2065fc8976c6c21 Mon Sep 17 00:00:00 2001 From: bradanlane Date: Sun, 5 May 2024 10:08:18 -0400 Subject: [PATCH 4/6] correct one and zero list values the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data. --- IrRobotControl/glove/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IrRobotControl/glove/code.py b/IrRobotControl/glove/code.py index 3eafa211f..610704af4 100644 --- a/IrRobotControl/glove/code.py +++ b/IrRobotControl/glove/code.py @@ -34,8 +34,8 @@ # Create an encoder that will take numbers and turn them into IR pulses encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], - one=[550, 550], - zero=[550, 1700], + one=[550, 1700], + zero=[550, 550], trail=0) def log(s): From 22f911ab6ed7af018268f67c4f5b56b1cdae7554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brad=C3=A1n=20Lane?= Date: Mon, 3 Jun 2024 09:32:59 -0400 Subject: [PATCH 5/6] use standard header values (9000,4500) and standard marker value (560); retested --- .../CPX_Treasure/code.py | 6 +++--- Circuit_Playground_Express_IR_Zombie_Game/code.py | 6 ++++-- .../CPX_IR_CPX_transmit/code.py | 6 ++++-- IrRobotControl/glove/code.py | 6 +++--- STEMMA_IR_LED_Emitter/code.py | 7 ++++--- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py index 264b3e694..e94cf4a47 100644 --- a/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py +++ b/Circuit_Playground_Express_IR_Treasure_Hunt/CPX_Treasure/code.py @@ -19,9 +19,9 @@ pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15) # Create an encoder that will take numbers and turn them into IR pulses -encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], - one=[550, 1700], - zero=[550, 550], +encoder = adafruit_irremote.GenericTransmit(header=[9000, 4500], + one=[560, 1700], + zero=[560, 560], trail=0) while True: diff --git a/Circuit_Playground_Express_IR_Zombie_Game/code.py b/Circuit_Playground_Express_IR_Zombie_Game/code.py index c482905d5..c889c609a 100755 --- a/Circuit_Playground_Express_IR_Zombie_Game/code.py +++ b/Circuit_Playground_Express_IR_Zombie_Game/code.py @@ -28,8 +28,10 @@ # Create a 'pulseio' output, to send infrared signals on the IR transmitter @ 38KHz pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15) # Create an encoder that will take numbers and turn them into NEC IR pulses -encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], one=[550, 550], - zero=[550, 1700], trail=0) +encoder = adafruit_irremote.GenericTransmit(header=[9000, 4500], + one=[560, 1700], + zero=[560, 560], + trail=0) # Set between 0 and 1 to set LED pulse speed. Smaller numbers are slower. healer_led_pulse = 0.008 diff --git a/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py b/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py index b29c63957..7b3d778bf 100644 --- a/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py +++ b/Circuit_Playground_Express_and_IR/CPX_IR_CPX_transmit/code.py @@ -11,8 +11,10 @@ # Create a 'pulseio' output, to send infrared signals on the IR transmitter @ 38KHz pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15) # Create an encoder that will take numbers and turn them into NEC IR pulses -encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], one=[550, 1700], - zero=[550, 550], trail=0) +encoder = adafruit_irremote.GenericTransmit(header=[9000, 4500], + one=[560, 1700], + zero=[560, 560], + trail=0) while True: if cpx.button_a: diff --git a/IrRobotControl/glove/code.py b/IrRobotControl/glove/code.py index 610704af4..accacb0b8 100644 --- a/IrRobotControl/glove/code.py +++ b/IrRobotControl/glove/code.py @@ -33,9 +33,9 @@ pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15) # Create an encoder that will take numbers and turn them into IR pulses -encoder = adafruit_irremote.GenericTransmit(header=[9500, 4500], - one=[550, 1700], - zero=[550, 550], +encoder = adafruit_irremote.GenericTransmit(header=[9000, 4500], + one=[560, 1700], + zero=[560, 560], trail=0) def log(s): diff --git a/STEMMA_IR_LED_Emitter/code.py b/STEMMA_IR_LED_Emitter/code.py index e3e3a491a..3e6baeeea 100644 --- a/STEMMA_IR_LED_Emitter/code.py +++ b/STEMMA_IR_LED_Emitter/code.py @@ -10,9 +10,10 @@ # Create a 'PulseOut' to send infrared signals on the IR transmitter @ 38KHz pulseout = pulseio.PulseOut(board.D5, frequency=38000, duty_cycle=2**15) # Create an encoder that will take numbers and turn them into NEC IR pulses -emitter = adafruit_irremote.GenericTransmit( - header=[9500, 4500], one=[550, 1700], zero=[550, 550], trail=0 -) +encoder = adafruit_irremote.GenericTransmit(header=[9000, 4500], + one=[560, 1700], + zero=[560, 560], + trail=0) # count variable count = 0 From 8fec3a5a29282ce43748f89501f2cdafa877e104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brad=C3=A1n=20Lane?= Date: Mon, 3 Jun 2024 09:40:46 -0400 Subject: [PATCH 6/6] correct copy/paste error --- STEMMA_IR_LED_Emitter/code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STEMMA_IR_LED_Emitter/code.py b/STEMMA_IR_LED_Emitter/code.py index 3e6baeeea..b2294ac74 100644 --- a/STEMMA_IR_LED_Emitter/code.py +++ b/STEMMA_IR_LED_Emitter/code.py @@ -20,7 +20,7 @@ while True: # send IR pulse - emitter.transmit(pulseout, [255, 2, 255, 0]) + encoder.transmit(pulseout, [255, 2, 255, 0]) # increase count count += 1 # print to REPL