-
Notifications
You must be signed in to change notification settings - Fork 28
Description
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) ;
}
}