Hello,
(And Happy New year too)
I am a relative novice re. coding, so please be patient
I have connected an TSOP48 IR receiver to an Mega 2560 clone and am using the code below. This was copied from online example and not altered by me as yet.
#include <IRremote.hpp>
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
//
If I use a Sony TV remote I get hex values on the Arduino serial monitor, for pressing 1, 2, 3 eg:
Oscilloscope trace at IR receiver output looks like:
With 12 negative pulses, +pulse width is ~650uS, -ve pulse width 550uS.
This is all good as far as I am aware
However if I use a light bulb controlling remote, the serial monitor is all FFFFFFFF
Oscilloscope trace looks like:
Same timebase on both traces.
With 33 negative pulses, in the first section of 9 negative pulses +ve pulse width is ~540uS, -ve pulse width 580uS. (measured using 'scope cursor and measurement facility).
My question is, how can I decode this data stream? Is there something that has to be passed to the library IRremote? Or does another library have to be used? Or do I have write my own (too difficult as this stage for me?)
I have a similar issue with a sound system IR remote control. At this stage I am guessing when one is fixed others will be too.
Thanks for help.