Ashraf Nabil
Published © MIT

Universal Remote Control using Arduino, 1Sheeld and Android

This project shows how to control your TV, Satellite receiver and Stereo using your Android mobile instead of using there remote controller.

IntermediateFull instructions provided12,126
Universal Remote Control using Arduino, 1Sheeld and Android

Things used in this project

Story

Read more

Code

Remote Control Code

C/C++
this code use several buttons in the keypad shield to turn on/off the TV, change the satellite receiver channel and control the stereo.
#include <OneSheeld.h>
#include <IRremote.h>
IRsend irsend;
void setup() 
{
  OneSheeld.begin();
}

void loop(){  if(Keypad.isRowPressed(0) && Keypad.isColumnPressed(0))
  {
    irsend.sendNEC(0x20DF10EF, 32);
  }
  else if(Keypad.isRowPressed(0) && Keypad.isColumnPressed(1))
  {
    irsend.sendNEC(0x20DFC03F, 32);
  }
   else if(Keypad.isRowPressed(0) && Keypad.isColumnPressed(2))
  {
    irsend.sendNEC(0x20DF40BF, 32);
  }
   else if(Keypad.isRowPressed(1) && Keypad.isColumnPressed(1))
  {
    irsend.sendNEC(0x41048B7, 32);
  }
  else if(Keypad.isRowPressed(1) && Keypad.isColumnPressed(0))
  {
    irsend.sendNEC(0x410C837, 32);
  }
  else if(Keypad.isRowPressed(2) && Keypad.isColumnPressed(0))
  {
      for (int i = 0; i < 3; i++) {
      irsend.sendSony(0xa81, 12); // Sony TV power code
      delay(40);
    }
  }
}

Credits

Ashraf Nabil

Ashraf Nabil

8 projects • 102 followers

Comments