In this blog, you will learn how to control different LEDs from the infrared remote control. In my project, I am controlling four LEDs red, yellow, green and multi colors.
By pressing the 1 button on remote control LED red will be turn on,By pressing button 2 LED red will be turn off ,by pressing 3 led yellow turn on ,by pressing 4 led yellow turn off ,by pressing 5 led green turn on ,by pressing 6 led green turn off, by pressing 7 multicolour led turn on and by pressing 8 it off.
Now if you want to turn on all the LEDs, just pressing 1,3,5and 7 buttons with remote control. And if you pressing 2,4,6 and 8 all the LEDs will be turned off.
1: Components need for the project:
The components that you will be needing for this project are
1: Infrared (IR) sensor Module2: Infrared (IR)Remote Control
3: Arduino Uno (or any other board)4: LED,s(red, yellow, green, multicolor)5: Resistors(4*270ohm)6: Jumper wires7: PC/Laptop
To use IR sensor you need to download the IR Library. TheLibrary Link is down given https://github.com/z3t0/Arduino-IRremote.Go to the link download the library unzip it and change the library name to IRremote.Copy the library folder and go to the Arduino IDE library folder and paste it here. Now you can use the IR library in your code.
3: Finding the HEX codes :
First, you need to find the hex code for different buttons of IR remote control, for that you need to copy sketch for finding HEX codes and paste it in Arduino IDE. Verify the sketch and upload it to the Arduino board.
Make sure the Arduino board is connected to the right port of pc/laptop and also connect the IR receiver module to the Arduino board.
IR sensor module has 3 pins pin 1 which are signal pin connect to the 11th pin of Arduino the middle pin VCC is connected to the5 volts of Arduino pin and the Ground pin is connected to the ground pin of the Arduino.
After upload, the sketch goes to the serial monitor of Arduino IDEand open it.
Now press one on the IR remote control and you will be seen that HEX code appear on the serial monitorby pressing different buttons on remoteyou will be seen different hex code on serial monitor copy those codesand store it in text file or direct paste it in your sketch which will be used for controlling LEDs or for some other projects.
Hello, Friends, My name is Mohsin Habib and I am an Electrical Engineer. I have Experience In Circuit Designing, Arduino Projects, PLC’s Projects, HMI Designing, Networking and much more.
I have done lots of projects in Arduino.