Skip to content

NEC one/zero codes reversed #40

Closed
@kevinjwalters

Description

@kevinjwalters

I'll split this up as appropriate after some discussion, I just wanted to record some things I just noticed:

  1. NEC one/zero look reversed in
    header=[9500, 4500], one=[550, 550], zero=[550, 1700], trail=0

    For comparison there's an LIRC configuration file shown in Adafruit Learn: Using an IR Remote with a Raspberry Pi Media Center: Configure and Test which shows the one represented with 594 1634, the zero by 594 519.
    That won't matter if the data isn't used outside of this library but it will break and confuse any attempts at IR between CP and all other code / IR data. The reversed values and data feature elsewhere too, e.g. Adafruit Learn: Infrared Receive and Transmit with Circuit Playground Express.

Other observations.

  1. The duty cycle on the carrier is 50% in examples. I noticed an analysis of Sony's IR output and the claim was that was 20%. That could be because it's more power efficient and perhaps that's useful on the CPX as well to reduce power usage?
  2. The trail=0 appears to break my attempt to generate Sony IR codes. I just tested a feature to support trail=None and my code now works. What does setting a final pulse (using pulseio) of 0 on the end of a load of duration pairs do?
  3. Sending sony codes can require sending 20 bits (not an integer number of bytes). I've just coded up an optional keyword arg to support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions