I recycled a InfraRed receiver module from an old VCR tonight. I connected it to my Arduino 2560, and I’m displaying raw data in the serial monitor whenever I press a key on the remote. I’m attempting to do something useful with this data, like turn lights on and off, or adjust my thermostat. Will post more as the project develops.
Become the Maker you were born to be. Try Arduino Academy for FREE!
int IRsignal[] = {
// ON, OFF (in 10’s of microseconds)
34, 1896,
444, 440,
52, 164,
56, 164,
54, 164,
54, 54,
56, 54,
56, 54,
54, 56,
54, 54,
56, 166,
52, 164,
54, 164,
56, 54,
54, 56,
54, 58,
52, 54,
56, 56,
52, 58,
52, 58,
52, 164,
54, 54,
56, 54,
56, 56,
52, 54,
56, 54,
56, 166,
52, 164,
54, 56,
54, 164,
54, 164,
56, 162,
56, 164,
54, 164,
54, 4526,
442, 434,
56, 164,
54, 164,
54, 164,
56, 54,
54, 56,
54, 54,
56, 54,
56, 54,
54, 164,
54, 164,
56, 164,
54, 54,
56, 54,
56, 54,
54, 56,
54, 58,
52, 54,
54, 56,
52, 166,
54, 60,
50, 54,
56, 56,
54, 56,
54, 56,
52, 166,
52, 164,
56, 54,
54, 166,
54, 162,
56, 164,
54, 164,
54, 164,
56, 4524,
444, 434,
54, 162,
56, 162,
58, 162,
56, 52,
58, 52,
58, 54,
54, 56,
54, 54,
56, 164,
54, 164,
54, 162,
56, 164,
54, 162,
56, 0};
There's a great library to work with IR Remotes: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
It allows you to easily read signals from remotes of many brands.
Try this:
http://www.remotecentral.com/cgi-bin/codes/samsung/
These are not hex codes, it's raw pulse data.
I believe I read it does not work with Samsung. I don't need to know what the codes mean, I just need to identify a difference, and make it mean something.
I was able to use that library, and by turning off a lot of it's functionality (It didn't recognize Samsung per se, but did read it's raw values), I was able to just display a long int version of what transpires. I did a switch case on that long int to do something cool for each unique button on the remote. See http://arduinotronics.blogspot.com/2012/11/arduino-ir-receiver-part-2.html