This project is a prototype for controlling a variety of home appliances using a infrared sensor and a remote. The project can be edited to accommodate as many numbers of appliances as there are keys on the remote.
PREREQUISITES- Download the library IRremote here
- Learn how to install the library here
- Learn more about the IRremote Library here
- See how to check the hexadecimal values of your remote here
IRrecv irrecv(receivePin)
Create the receiver object, using a name of your choice.
irrecv.enableIRIn()
Begin the receiving process. This will enable the timer interrupt which consumes a small amount of CPU every 50 µs.
irrecv.decode(&results)
Attempt to receive a IR code. Returns true if a code was received, or false if nothing received yet. When a code is received, information is stored into "results".
irrecv.resume()
After receiving, this must be called to reset the receiver and prepare it to receive another code.
irrecv.blink13(true)
Enable blinking the LED when during reception. Because you can't see infrared light, blinking the LED can be useful while troubleshooting, or just to give visual feedback.
CONNECTIONSMake the connection as shown in the diagram
Comments