123lYT
Published © Apache-2.0

Simple IR Remote Project

IR Remote with 3 led and 1 buzzer

BeginnerFull instructions provided9,283
Simple IR Remote Project

Things used in this project

Hardware components

IR receiver (generic)
×1
IR Remote Control Car MP3
×1
Resistor 1k ohm
Resistor 1k ohm
×3
5 mm LED: Red
5 mm LED: Red
×1
5 mm LED: Green
5 mm LED: Green
×1
LED, Blue
LED, Blue
×1
Buzzer, Piezo
Buzzer, Piezo
×1
Arduino UNO
Arduino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Code

Code

Arduino
#include <IRremote.h>

const int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
const int redPin = 10;
const int greenPin = 11;
const int bluePin = 9;
const int buzzPin = 8;


void setup(){
  irrecv.enableIRIn();
  irrecv.blink13(true);
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  pinMode(buzzPin, OUTPUT);
}

void loop(){
    if (irrecv.decode(&results)){

        switch(results.value){
          case  0xFF30CF: //Keypad button "5"
          digitalWrite(redPin, HIGH);
          delay(2000);
          digitalWrite(redPin, LOW);
          }

        switch(results.value){
          case 0xFF18E7: //Keypad button "2"
          digitalWrite(greenPin, HIGH);
          delay(2000);
          digitalWrite(greenPin, LOW);
          }

          switch(results.value){
          case 0xFF7A85: //Keypad button "2"
          digitalWrite(bluePin, HIGH);
          delay(2000);
          digitalWrite(bluePin, LOW);
          }

          switch(results.value){
          case 0xFF10EF: //Keypad button "2"
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          delay(100);
          digitalWrite(buzzPin, HIGH);
          delay(100);
          digitalWrite(buzzPin, LOW);
          }

        irrecv.resume(); 
    }
}

Credits

123lYT

123lYT

5 projects • 3 followers

Comments