Skip to content

NECIRrcv drops last "0" of an NEC 32 bit msg 0xF0F0F0F0 #1

@nielseng2017

Description

@nielseng2017

It was a relief to finally find an NEC IR receive library that actually compiles and runs - thank you!
The IR transmitter repeatedly sends 0xF0F0F0F0, and he program below prints 0xF0F0F0F - the last "0" is missing.
A scope trace shows the last zero bit of the last byte to be followed by a bit-Mark and a long space on the order of 15ms, and then repeats. I can provide a screen shot of the trace. Hopefully this is an easy fix, or do I need to change something???

Please advise

-George

// look for IR codes and print them as they are received

#include <NECIRrcv.h>
#define IRPIN 3 // pin that IR detector is connected to

NECIRrcv ir(IRPIN) ;

void setup()
{
Serial.begin(19200) ;
Serial.println("NEC IR code reception") ;
ir.begin() ;
}

void loop()
{
unsigned long ircode ;

while (ir.available()) {
ircode = ir.read() ;
Serial.print("got code: 0x") ;
Serial.println(ircode,HEX) ;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions