Today I’m going to show you how to control any device with an Infrared remote(TV,DVD,AC etc.) and with the help of Arduino board. So lets get started.
Things you’ll need :-
Of Infrared reciever-
Pin 1 – GND (Ground pin of Arduino).
Pin 2/Middle pin – VCC (5v supply of Arduino).
Pin 3 – Data pin (pin number 3 on Arduino).
Note :- The pin no. 3 is a bit separated from the other two ! Don’t misunderstand between pin1 & pin3 !
#include <IRremote.h> int RECV_PIN = 3; //declared for receiving pulses int c=0; // declared if you want to control with a single button IRrecv irrecv(RECV_PIN); decode_results results; void setup() { pinMode(9, OUTPUT); Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value); irrecv.resume(); // Receive the next value if(results.value==YOUR VALUE1) { digitalWrite(9,HIGH); } else if(results.value==YOUR VALUE2) { digitalWrite(9,LOW); } } } /* if((results.value== YOUR VALUE3)&&(c%2==1)) // enables you to turn on & off with the help of same button" { digitalWrite(9,HIGH); } else if((results.value==YOUR VALUE3)&&(c%2==0)) { digitalWrite(9,LOW); } c++; }}*/
Here’s a video tutorial which will definitely make things easier for you 😉
Please comment below if you face any difficulties. I’d love to solve them 🙂 .
Radar systems are integral to a variety of crucial applications, from national defense to weather…
Metal fabrication plays a vital role in engineering, transforming metal into functional components of everyday…
The pieces being produced in complex machining services frequently have difficult patterns. They may need…
Digital height gauges are precision measuring instruments used to determine the height of an object…
Injection molding is a rapid prototyping and manufacturing process applicable in the mass production of…
Fastening hardware, such as industrial pins, serve various functions in all industries. Butprimarily, you can…
View Comments
It was a bit tough to understand just by reading
But the video made it a lot simpler
You should make more Ardino DIY
P.S.- Do you know from where i should get this stuff