sagar saini
Published © GPL3+

Arduino based universal TV Remote

We can control Tv or any IR system using this, Arduino made this very simple to program and run different instructions

IntermediateFull instructions provided1 hour15,486
Arduino based universal TV Remote

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
IR transmitter (generic)
×1
Tactile Switch, Top Actuated
Tactile Switch, Top Actuated
×1

Software apps and online services

EasyEDA
JLCPCB EasyEDA
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Breadboard, 400 Pin
Breadboard, 400 Pin

Story

Read more

Schematics

Circuit diagram

pdf

Code

code

C/C++
//sagar saini : hackster saini_sagar_7294 follow us on instagram, hackaday profile link:
//
//Universal IR Remote Controller

#include <IRremote.h>
#include "LowPower.h"

IRsend irsend;

const int b1  = 2;
const int b2  = 4;
const int b3  = 5;
const int b4  = 6;
const int b5  = 7;
const int b6  = 8;
const int b7  = 9;
const int b8  = 10;
const int b9  = 11;
const int b10 = 12;

int timer;
int modeCounter = 0;

void wakeUp() {
  timer = 0;
}

void setup() {
  pinMode(b1, INPUT);
  pinMode(b2, INPUT);
  pinMode(b3, INPUT);
  pinMode(b4, INPUT);
  pinMode(b5, INPUT);
  pinMode(b6, INPUT);
  pinMode(b7, INPUT);
  pinMode(b8, INPUT);
  pinMode(b9, INPUT);
  pinMode(b10, INPUT);
}

void loop() {
  attachInterrupt(0, wakeUp, HIGH);
  while (timer < 10000) {
    if (digitalRead(b1) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }

    if (digitalRead(b2) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }

    if (digitalRead(b3) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }

    if (digitalRead(b4) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }

    if (digitalRead(b5) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    
    if (digitalRead(b6) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    
    if (digitalRead(b7) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    
    if (digitalRead(b8) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    
    if (digitalRead(b9) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    
    if (digitalRead(b10) == HIGH) {
      timer = 0;
      delay(50);
      irsend.sendNEC(0x0000, 32);     //Enter Remote Hex Value
    }
    delay(1);
    timer = timer + 1;

  }
  
  LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
}

Credits

sagar saini

sagar saini

81 projects • 83 followers
I am Sagar Saini an electronic hardware enthusiast

Comments