I have done multiple searches but I cannot find a way to interface my IR sensor with the Arduino or a TV Remote. I am using a PNA4602 (IR (Infrared) Receiver Sensor [TSOP38238] : ID 157 : Adafruit Industries, Unique & fun DIY electronics and kits) with the Arduino Duemilanove. I have the signal pin of my IR sensor connected to digital pin zero and I am using this code just to see if it read anything. It read some but only ones and zeroes.
Here is my code
I know it would read ones and zeroes but I would like to get a value that I can then use to control other things. I went through the tutorial and got the data already but I don't know what to do with it.
You use a program the same as you used to get the data but instead of printing it out you have an if statement that compares what you have just read in to a known button. Then if it is true you then do what ever you want to do when that button is pressed. You then repeat this for each case you want to react to. At the end of the loop() it repeats and you go round again and see if there is anything else from the remote and if it matches anything you want to do.