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);
}