Introduction: ARDUINO IR REMOTE RECIEVER

Picture of ARDUINO IR REMOTE RECIEVER

WELCOME TO ARDUINO PROJECTS!!!!!in this ibles i am going to teach you about ir receiver using arduino.

programming my Arduino to identify sets of digits transmitted from my IR remote.
With this program you can control LEDs over a normal tv remote.

sounds interestinn right let's get started with billing electroics;-

Step 1: BILLING ELECTRONICS:-

Picture of BILLING ELECTRONICS:-

You will need:

- A TV IR Remote (I used one from samsung)

- 4 LEDs or more

- A IR Receiver (TSOP4838, or a similar)

- any Arduino

Step 2: BUILDING:-

Picture of BUILDING:-

connect led to arduino board:

LED1 : Pin D4

LED2 : Pin D5

LED3 : Pin D6

LED4 : Pin D7

connect Reciver:

Pin1 : Pin D9

Pin2 : Gnd

Pin3 : 5v

Use an Digital Pin and write the Pin into the Code.

Step 3: CODING:-

Picture of CODING:-

#include

int RECV_PIN = 9;

int reversePin = 4; int forwardPin = 5; int playPin = 6; int pausePin = 7;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup() {

Serial.begin(9600);

irrecv.enableIRIn();

// Start the receiver

pinMode(reversePin, OUTPUT);

// sets the digital pin as output

pinMode(forwardPin, OUTPUT);

// sets the digital pin as output

pinMode(playPin, OUTPUT);

// sets the digital pin as output

pinMode(pausePin, OUTPUT);

// sets the digital pin as output }

void loop() {

if (irrecv.decode(&results)) {

long int decCode = results.value;

Serial.println(decCode);

switch (results.value) {

case 1431986946:

Serial.println("Forward");

digitalWrite(forwardPin, HIGH);

// sets the LED on

break;

case -11780576:

Serial.println("Reverse");

digitalWrite(reversePin, HIGH);

// sets the LED on

break;

case -873913272:

Serial.println("Play");

digitalWrite(playPin, HIGH);

// sets the LED on

break;

case -1025287420:

Serial.println("Pause");

digitalWrite(pausePin, HIGH);

// sets the LED on

break;

case 1791365666:

Serial.println("Stop");

digitalWrite(forwardPin, LOW);

// sets the LED off

digitalWrite(reversePin, LOW);

// sets the LED off

digitalWrite(playPin, LOW);

// sets the LED off

digitalWrite(pausePin, LOW);

// sets the LED off

break;

default:

Serial.println("Waiting ..."); }

irrecv.resume(); // Receive the next value } }

Comments

About This Instructable

1,727views

23favorites

License:

More by appytechie:Program the Linkit One Using a Raspberry PILinkit One Controlled El-wireLinkit One - Dice
Add instructable to: