Skip to content

Mini Remote Control: No signal sent is valid? #52

Closed
@eat-sleep-code

Description

@eat-sleep-code

@tannewt

I am tinkering with parts from an old AdaBox -- a Circuit Playground Express and Mini Remote Control [Product ID: 389].

I installed CircuitPython 6.3.0 on the Circuit Playground Express. I also created a lib folder on the CPE and dropped the adafruit_irremote.mpy from Bundle for Version 6.x in it.

I then placed this code into a code.py file on it:

import board
import pulseio
import adafruit_irremote

pulseIn = pulseio.PulseIn(board.IR_RX, maxlen=120, idle_state=True)
decoder = adafruit_irremote.GenericDecode()

print("start")

while True:
    pulses = decoder.read_pulses(pulseIn)
    try:
        received = decoder.decode_bits(pulses)
    except adafruit_irremote.IRNECRepeatException:
        print("Repeat Exception")
        continue
    except adafruit_irremote.IRDecodeException:
        print("Decode Exception")
        continue
    except Exception as ex:
        print("General Exception", ex)
        continue
   
    print("Code received", received)

When I press the UP button (shown here pressed several times), this is the output.

General Exception IRMessage(pulses=(6366, 251, 181, 241, 175, 191, 511, 249, 177, 273, 179, 214, 181, 271, 176, 2323, 175, 245, 181), reason='Pulses do not differ')
General Exception IRMessage(pulses=(179, 242, 174, 247, 179, 269, 178, 299, 179), reason='Too short')
General Exception IRMessage(pulses=(172,), reason='Too short')
Code received None
General Exception IRMessage(pulses=(178,), reason='Too short')
General Exception IRMessage(pulses=(179, 240, 176, 276, 197, 253, 205, 274, 179, 272, 175, 474, 181, 270, 177, 245, 181, 297, 311, 281, 181, 269, 178, 242, 174, 280, 178, 245, 182), reason='Pulses do not differ')
General Exception IRMessage(pulses=(174,), reason='Too short')
General Exception IRMessage(pulses=(179, 270, 177, 299, 179, 243, 172, 222, 173, 1685, 178, 724, 181, 1114, 176, 359, 182, 831, 178, 272, 175, 840, 206, 327, 177), reason='Only mark & space handled')

Not once did I appear to receive a valid code.

I am not sure what is incorrect with my code -- for the most part it is pretty close to the example provided on the IR Test with Remote page.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions