Arduino – Control LEDs with a Remote Control
Step 1: IR library
First you need to go to this page and download the IR library. You just need to follow the read me file to install. I think that any IR remote control can do this, I’ll be using a Philips Universal one.
Step 2: Parts required
1x Remote control
1x IR receiver ( I’ll be using TSOP4838)
4x 220ohm resistors
The infrared receiver has 3 pins:
First pin: Vout, outputs HIGH when no signal is present and LOW when a mark is received.
Second pin: GND.
Third pin: Vcc.
Step 3: Circuit diagram
You need to wire your circuit something like this.
And then I went to the arduino IDE > file>examples>IRremote> IRrecvDemo. You need to upload the sketch to your arduino, open the serial monitor and start using your remote control and see which values the arduino is receiving.
After a while I’ve wrote down which values appear in the serial monitor when you press the volume up key or any other key, and write it down for all the keys you want to use. And they were:
You will need to convert these hexadecimal numbers to decimal, you can use this tool for that.
Step 4: Upload the Arduino Code
Upload this code
* IRremote Library – Copyright 2009 Ken Shirriff
* created by Rui Santos, http://randomnerdtutorials.wordpress.com
* Control LED’s with a remote control
For more detail: Arduino – Control LEDs with a Remote Control
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test