TV REMOTE INFRARED PRANKS: Fox News-B-Gone, + more

Are you interested in confounding your grandparents, or making your grandchildren mistrustful of technology?
Would you like to make that special someone think they have lost their grip on reality?
When this poor fellow hits channel up, the arduino sends a signal for channel down, and vice versa:

The code and instructions for the following pranks are below:

FOX NEWS-B-GONE:
When someone turns the TV to the right-wing Fox News channel, the Arduino responds by typing in the numbers for CSPAN, the non-biased government channel.

VOLUME-B-GONE
When they hit volume up the arduino mutes the volume. Volume down will also mute, and if they hit mute to un-mute, the arduino re-mutes!

LOUD TV, CAN’T TURN IT DOWN!
This one is the most likely to convince someone they are crazy. Pressing Channel Up or Down increases the volume one notch.
If they press volume down, the volume is pressed back up one notch higher. If they press mute, it will be un-muted

SLOWLY DISAPPEARING VOLUME
Subtle. Once every 2 minutes the arduino will lower the volume 2 notches

ONLY EVEN TV CHANNELS
If they hit channel up, the arduino will hit it again.
Channel down will also be repeated.

CAN’T TURN OFF THE TV
Once they turn on the TV the program is activated.
If they try to turn the TV off the Arduino will wait a second and then turn it back on.

ONLY C-SPAN
when someone turns the power on, it turns the channel to C-span
if they hit channel up, the arduino will hit channel down
if they hit channel down, then back up
if they type in a number, the arduino waits 5 seconds, then types back in C-span

The arduino has an IR receiver and an IR led. It receives
IR data from a TV remote and then sends IR data to the TV.

This code is written for the Phillips Magnavox.
If you want to use other remotes you can use this same program
but the input and output values will be different.
There is a fantastic library for capturing and sending different codes.
You have to download it to use these pranks anyway.
It’s great for decoding the different types of remotes.
You can download it here:

There is example code on his site for capturing and sending any remote data.
His forum page is here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251570417 where he provides a link to the site above.

Ingredients:
1 IR LED
1 IR Receiver
a 220 ohm resistor for the Receiver
a 100 ohm resistor for the LED
the downloaded IR library from the link above

/*
FOX NEWS -B- GONE
If anyone turns the channel to Fox News the Arduino will 
turn the channel to C-Span

The Arduino keeps a running count of which channel the 
TV is turned to.  I've got it set to begin on channel 3, 
so turn to channel 3, then turn on the Arduino.  
Channel up or down will alter the 'channel' variable.

Also, if someone type in the numbers for Fox News, (45 with my code)
then the Arduino will type in C-Span, channel 33.  

*/

//To Do:
// Put your channel numbers into the channel array in order.  If you don't have channel 4, 
// then you would enter 2,3,5,6,7, etc.  

// Also replace the input and output values if your 'fox news' is 
// not channel 45, and your C-span isn't 33. 
// There is a key below with all the input and output numbers.


//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11.  Use a 220 ohm resistor before it.

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.


#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int i = 0;
int channel = 1;  // Array [1] is channel 3 in the array below.  Array [channel]
int lastpressed = 0;

unsigned long time1;
unsigned long time2;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  
  
}

void loop() {
 unsigned long inputValue;
 
 int pressing = 0;
  
  int Array[20] = {2,3,4,5,6,7,8,9,10,12,13,14,15,17,19,33,45,71,72,91} ;
// The Channel Array.  Channel 3 is at Array [1], so the variable 'channel' = 1 to represent 3 at the beginning
  
//  Serial.println(Array[channel]);
  /*
INPUT codeValue KEY (for Phillips)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Phillips)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
*/

//-------------------------------------------
  //Volume -B- Gone
  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
  inputValue = results.value;
  //Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
//------------------------------------------------------
  //CHANNEL COUNTER
  if (inputValue != lastpressed){
 if (inputValue == 32 || inputValue == 2080){  //INPUT Channel up
  lastpressed = inputValue;
  channel++;
 }
 }
 
 
 if (inputValue != lastpressed){
 if (inputValue == 33 || inputValue == 2081){  //INPUT Channel down
   lastpressed = inputValue;
  channel--;
 }
 }

if (channel > 19){     //if the channel reaches the top it starts back at the beginning
  channel = 0;
}
if (channel < 0){    // if the channel is turned below two it starts back at the beginning
  channel = 19;
}
//------------------------------------------------------

//if channel = 45, Fox News, then turn it to 33, CSPAN!
// if your channel numbers are different then use the key above
// and replace these values with your own.

Serial.println(Array[channel]);

if (Array[channel] == 45){
  
  delay(400);
  irsend.sendRC5(0x803, 12); // OUTPUT 3
  delay(400);
  irsend.sendRC5(0x3, 12); // OUTPUT 3   for channel 33
  delay(400);                                         

channel = 19;
lastpressed = 0;

 irrecv.enableIRIn(); //enable the IR receiver again
}


//------------------------------------------------------
//TYPING IN THE NUMBERS
//wait 3 seconds to see if they will enter 4 and also 5 for channel 45.


// if someone types in the digits 45
if (inputValue == 1 || inputValue == 2049){  //INPUT 4
time1 = millis();
pressing = 4;
}

time2 = millis();

if (time2 - time1 < 3000){        //if 3 seconds expire then they only entered 1 digit, forget about it
if (inputValue == 5 || inputValue == 2053){  // if they have typed in 45
pressing = 0; // reset this variable
delay(400);
 //Send out the C-Span code for channel 33
 irsend.sendRC5(0x803, 12); // OUTPUT 3    
  delay(400);
  irsend.sendRC5(0x3, 12); // OUTPUT 3
  delay(400);                            

 irrecv.enableIRIn(); //enable the IR receiver again
}
}


 

//FYI there is a flaw in the program.  If someone types in digits other than
// 45 then the Channel variable will be off.  
  
   
 irrecv.resume(); // Receive the next value
 }
  

  
  delay(10);
}
// VOLUME -B- GONE
// The arduino keeps the TV muted 

// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11.  Use a 220 ohm resistor before it.

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.

#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int i = 0;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Phillips)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Phillips)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------
  //Volume -B- Gone
  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
  inputValue = results.value;
  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
  // If someone presses Volume up then the Arduino will hit Mute!
  if (inputValue == 16 || inputValue == 2064){  //INPUT volume up 
    delay(800);
  irsend.sendRC5(0x80D, 12); // 80D is the Mute OUTPUT code
    delay(400);
 
  irrecv.enableIRIn(); //enable the IR receiver again
  }
  
  // If someone presses Volume Down it also hits MUTE
  if (inputValue == 17|| inputValue== 2065){  //INPUT volume down
       delay(800);
  irsend.sendRC5(0xD, 12); // 80D is the Mute OUTPUT code
       delay(400);
       
irrecv.enableIRIn(); //enable the IR receiver again  
}


//If someone hits mute to cancel it out, the Arudino will re-send mute.  
  if (inputValue == 13 || inputValue == 2061){  //INPUT Mute
   delay(800);
  irsend.sendRC5(0x80D, 12); // 80D is the Mute OUTPUT code
   delay(400);
  
 irrecv.enableIRIn(); //enable the IR receiver again
}
   
 irrecv.resume(); // Receive the next value
 }
  
  delay(10);
}
// LOUD TV, CAN'T TURN IT DOWN!
// Pressing Channel Up or Down increases the volume.
// if they press volume down, the volume is pressed back up one notch higher
// if they press mute, it will be un-muted


//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11. Use a 220 resistor before it.

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.

#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int i = 0;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Phillips)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Phillips)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------
  //LOUD TV
  
  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
  inputValue = results.value;
  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
 
 
 if (inputValue == 32 || inputValue == 2080){  // if they hit Channel Up
    delay(800);
    irsend.sendRC5(0x810, 12); // 810 is the Volume Up Output code
      delay(400);
    irsend.sendRC5(0x10, 12); // 10 is also the Volume Up Output code, Volume has gone up by 2
      delay(400); 
   
   irrecv.enableIRIn(); //enable the IR receiver again
}
   
if (inputValue == 33 || inputValue == 2081){  // if they hit Channel Down
    delay(800);
    irsend.sendRC5(0x10, 12); // 10 is also the Volume Up Output code
      delay(400);   
 irsend.sendRC5(0x810, 12); // 810 is also the Volume Up Output code, Volume has gone up by 2
      delay(400); 

irrecv.enableIRIn(); //enable the IR receiver again
}

if (inputValue == 17 || inputValue == 2065){  // if they hit Volume down
    delay(400);
    irsend.sendRC5(0x10, 12); // 10 the Volume Up Output code
      delay(400);   
 irsend.sendRC5(0x810, 12); // 810 is also the Volume Up Output code, Volume has gone up by 2
      delay(400);   

irrecv.enableIRIn(); //enable the IR receiver again
}

if (inputValue == 13 || inputValue == 2061){  // if they hit Mute
    delay(800);
    irsend.sendRC5(0x10, 12); // 10 is also the Volume Up Output code
      delay(400); 
  irsend.sendRC5(0x810, 12); // 810 is also the Volume Up Output code, Volume has gone up by 2
      delay(400); 
 
 irrecv.enableIRIn(); //enable the IR receiver again
}
   
 irrecv.resume(); // Receive the next value
 }
  
  delay(10);
}
  //SLOWLY DISAPPEARING VOLUME
//Once every 2 minutes the arduino will lower the volume 2 notches

//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11. Use a 220 resistor before it.



#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int i = 0;

unsigned long time1;
unsigned long time2;
int var = 0;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Magnavox)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Magnavox)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------
  
  //You don't need the receiver for this one.  
//   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
//  inputValue = results.value;
//  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
 
 if (var == 0){  //start it
  time1 = millis();
var = 1;  
}

time2 = millis();

//Serial.println(time2 - time1);

if (time2 - time1 > 180000){  //if 2 minutes have passed
Serial.println("Volume Down");
time1 = time2; //reset the timer
      delay(400);
 irsend.sendRC5(0x811, 12); // 811 is volume down Output code
      delay(400);
irsend.sendRC5(0x11, 12); // 11 is also a volume down Output code
      delay(400);
      
//irrecv.enableIRIn(); //enable the IR receiver again, don't need it
}
   
 //irrecv.resume(); // Receive the next value, don't need it for this prank
// }
  
  delay(10);
}
//ONLY EVEN TV CHANNELS
// If they hit channel up, the arduino will hit it again.  
// Channel down will also be repeated.  


//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.

#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Phillips)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Phillips)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  
VOL UP= 10 or 810
VOL DOWN= 11 or 811
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------
//ONLY EVEN TV CHANNELS

  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
  inputValue = results.value;
  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
 
 if (inputValue == 32 || inputValue == 2080){  // if they hit Channel Up
      delay(800);
    irsend.sendRC5(0x20, 12); // 820 is the Channel Up Output code
      delay(800);
   
    irrecv.enableIRIn(); //enable the IR receiver again
}

if (inputValue == 33 || inputValue == 2081){  // if they hit Channel Down
     delay(800);
    irsend.sendRC5(0x21, 12); // 821 is the Channel Down Output code
     delay(800);  
  
 irrecv.enableIRIn(); //enable the IR receiver again
}
   
 irrecv.resume(); // Receive the next value
 }
  
  delay(10);
}
//CAN'T TURN OFF THE TV 
//Once they turn on the TV, they are unable to turn it back off.
// When they turn on the TV the program is activated.  
// If they turn the TV off by remote the arduino will turn 
// the TV back on.  


//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11.  Use a 220 resistor before it.

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.

#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int ProgramBegin = 0;
int trigger = 0;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Magnavox)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Magnavox)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------
  //CAN'T TURN OFF THE TV!
  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ; 
  inputValue = results.value;
  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  
  
  
   if (trigger == 0){ 
 if (inputValue == 12 || inputValue == 2060){  //They turn the TV on, begin the program
  trigger = 1;
  ProgramBegin = 1;
  Serial.println("Hello");
  delay(5000);
  inputValue = 0;
}
   }

if (ProgramBegin == 1){
 if (inputValue == 12 || inputValue == 2060){  //They turn the TV off
  Serial.println("Activated!");
   delay (2000); // Wait for it...
                // Turn the TV back on!
   irsend.sendRC5(0x80C, 12); // 80C is the Power Output code
      delay(400);
  
irrecv.enableIRIn(); //enable the IR receiver again
}
} 
    
 irrecv.resume(); // Receive the next value 
   }
 
     
  delay(10);
}
// YOU CAN ONLY WATCH C-SPAN
// when someone turns the power on, it turns the channel to C-span
// if they hit channel up, the arduino will hit channel down
// if they hit channel down, then back up
// if they type in a number, the arduino waits 5 seconds, then types back in C-span



//You will need the IR library, and IR led, and an IR receiver.
// the IR LED goes on digital pin 3.  Use a 100 ohm resistor before it.
// the IR receiver goes to pin 11.  Use a 220 resistor before it.

// If your channel numbers are different then use the key below to 
// enter in the correct channel numbers.

#include <IRremote.h>



int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int i = 0;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 unsigned long inputValue;
  
  /*
INPUT codeValue KEY (for Magnavox)  
Every button has 2 possible values.  Each one works.
CHANNEL UP = 32 or 2080
CHANNEL DOWN = 33 or 2081
VOL UP= 16, 2064
VOL DOWN= 17, 2065
1= 1, 2049
2= 2, 2050
3= 3, 2051
4= 4, 2052
5= 5, 2053
6= 6, 2054
7= 7, 2055
8= 8, 2056
9= 9, 2057 
0= 0, 2048
POWER= 12, 2060
MUTE=  13, 2061
MENU= 59, 2107
STATUS= 15, 2063
*/
  
  /*
OUTPUT CODE VALUE KEY (for Magnavox)
CHANNEL UP = 20 or 820
CHANNEL DOWN = 21 or 821  etc. 
VOL UP= 10
VOL DOWN= 11
1= 1 or 801 etc.
2= 2, 802
3= 3, 803
4= 4, 804
5= 5, 805
6= 6, 806
7= 7, 807
8= 8, 808
9= 9, 809
0= 0, 800
MUTE = 80D or D 
POWER= 80C, C
MENU= 83B, B
STATUS= 80F, F
  */

//-------------------------------------------

  
   if (irrecv.decode(&results) ) {
//  Serial.println (results.value, HEX) ;  
  inputValue = results.value;
  Serial.println(inputValue);  //You can see the input values for yourself, key is above
  


  if (inputValue == 12 || inputValue == 2060){  //They turn the TV on
delay(2000); // wait 2 seconds
     // turn it to C-span
     irsend.sendRC5(0x803, 12); // OUTPUT 3
  delay(400);
  irsend.sendRC5(0x3, 12); // OUTPUT 3
  delay(400);   

irrecv.enableIRIn(); //enable the IR receiver again
}

if (inputValue == 32 || inputValue == 2080){  // if they hit Channel Up
   delay(200);
     irsend.sendRC5(0x821, 12); // enter Channel Down
  delay(200);  

irrecv.enableIRIn(); //enable the IR receiver again
Serial.println("Hello");
}
   
if (inputValue == 33 || inputValue == 2081){  // if they hit Channel Down            
    delay(200);
      irsend.sendRC5(0x820, 12); // enter Channel Up 
  delay(200);
    
irrecv.enableIRIn(); //enable the IR receiver again
}

// If they type in a Number it will wait 5 seconds, then enter C-span
if (inputValue <= 9 && inputValue > 0 ){
  delay (5000);       //wait 5 seconds
                      // then turn it to C-span
irsend.sendRC5(0x803, 12); // OUTPUT 3
  delay(400);
  irsend.sendRC5(0x3, 12); // OUTPUT 3
  delay(400);   
  
irrecv.enableIRIn(); //enable the IR receiver again
} 
  
if (inputValue >= 2048 && inputValue <= 2057){  // this is a duplicate because each 
                                             //digit has more than one input value, (could be 9 or 2057 for digit 9)
 delay (5000);       //wait 5 seconds
                      // then turn it to C-span
  irsend.sendRC5(0x803, 12); // OUTPUT 3
  delay(200);
  irsend.sendRC5(0x3, 12); // OUTPUT 3
  delay(200);   

irrecv.enableIRIn(); //enable the IR receiver again
}
 

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

Cool idea.

I happen to like Fox News, though. They’re not as biased from my (republican) point of view ;D.

I happen to be a "whoever is less of a douche this round" type of person

and this looks to be some fun stuff, cool

This is a must build!

Bookmarked...