Hi, I have an old IR LED receiver and I managed to hook it up to another LED and saw that it worked and more to the point it was pulsing at the same frequency as my remote control. This gave me 2 ideas that I need help coding. 1 is to use the serial functions to actually record the IR signals that do not conform to the universal remotes with numerical codes & have proprietary signals (Like my !@#$% TV!) so that I could keep a library of IR coeds that run devices in my house. I could then use a IR transmitting LED to re-record them onto learning IR remotes. (Or make one from the arduino) but that is a long ways away from my coding skills.
However right now what I want to do is make a daylight sensor so that I can have the IR sensor turn the circuit on. My problem is that the IR sensor I have pulses a lot and I am not sure how to use it as a switch without it being a steady signal. I need to find a way to get the Arduino to not care that the IR sensor is pulsing. I was thinking of adding a delay in the code that checks the state of the switch. ie. make it so that the switch has to be held down for 1 second to change state... What does everyone else suggest?
LEDs are commonly used as lights, but then can also be used as photodiodes to detect light. This example circuit uses a single LED to sample the ambient light level and then glow at an appropriate brightness. It is tragically flawed by a slow refresh rate in the dark, but it shows how to sense.
Tragically flawed: In low light you can see the led flicker. I used a 220 Ohm resistor to make a kind of "visual darkness/shadow Geiger counter".
Ooooh I remember my ROP teacher saying something like that. What about my first idea, could you turn your Aduino ibto a learning remote if so inclined? Or even teach it to use the remote for different functions? TY!
Yes, you should be able to. But at 38,000 Hz you have about 420 clock cycles per Hz so it would have to be tight code during the read part.
OTOH you could get an IrDA module that catches the remote signal and gives you the codes via a serial link. You'll need to use the SoftSerial library (comes with your IDE, use that version) and 2 pins of your choosing. I know one person using that setup to read his electric meter.
What data you get, send it to your PC but don't use the Arduino Serial Monitor to catch it. On Windoze, Hyperterminal will let you cut&paste or you can use another terminal program or some other program (something you write) to capture and file the data.