Introduction: Arduino TV Chooser

About: Product design student, photography enthusiast, Arduino nerd.

Do you ever have trouble deciding what to watch? I know I do.. so I made this 'TV Chooser' to make the decisions for me!

This project is based off the crystal ball project found in the guide book that comes with the official Arduino starter kit, you can view a video tutorial of this project with Arduino founder, Massimo Banzi, here. With the code for that project as a starting point I created a new program that generates a random TV program (according to your inputs) and a season to watch.

In this example there is space for 10 different TV programs but you can have as many or as few options as you desire! I haven't dressed it up in any way (though I intend to), this instructable is just a guide to coding and wiring.

Equipment you will need:

Arduino board

Breadboard

USB connection cable

wire (approx. 15 long, 6 medium, 3 short)

5 x 220Ω (ohm) resistor

10 kilohm potentiometer

pushbutton

3 x LED (3 different colours, I chose red, yellow & green)

16x2 LCD screen

9V battery & battery snap (optional,if you want to power it without connecting to a computer)

Step 1: Wire Up the Board

Wire up the board as shown in the diagram. For detailed instructions on which pins to connect where when wiring up the LCD screen, LEDs, button, and potentiometer, please refer to the PDF, 'Wiring Instructions'.

A red wire indicates a line to power, black indicates a line to ground.

Step 2: Edit the Code

Download the code 'TV_Chooser_Instructable.ino' (make sure to place it a folder called 'TV_Chooser_Instructable').

You will need the Liquid Crystal library, which should come pre-installed on the Arduino IDE. If you don't have it you can download it from here.

Next you need to edit the code to suit your needs:

Wherever it says 'TV Show 1/2/3/etc.', replace this with the name of a TV show you want to watch

Wherever it says 'Number of Seasons', replace this with the number of seasons in the TV show described in that case

If you want to change the options just include an extra case field like this:

case (x):
lcd.print("TV Show (x + 1");

lcd.setCursor(0, 1);

lcd.print("Season");

lcd.setCursor(7, 1);

lcd.print(random(1, Number of Seasons));

delay(10000);

break;

Here 'x' is the random number that has been generated. Remember, if you change the number of variables in the switch case statement, you will need to change the value where it says 'reply = random(10)' near the beginning of the loop. Replace the 10 with your new amount of variables. This number is always one more than the last case value. To keep things simple number your cases 0, 1, 2, 3, etc. in order

Conversely, if you want to remove an option just take away a case field. Again, remember to edit the value where it says 'reply = random(10)'

Take a look at my code at the end of this instructable if you need some help with where to put things

Step 3: Plug in and Upload!

Plug your Arduino into your computer using the USB connection cable. Verify and upload your code and you're all set to go!

Press the button and see what the TV Chooser chooses for you to watch!

If you have a 9V battery and a battery snap, connect this to your Arduino by plugging a 2.1mm centre-positive plug connected to the battery snap into the board's power jack, and then plug out the USB connection

After 10 seconds the TV Chooser will reset itself, if you want to change this length of time you can change the value where it says 'delay(10000)' in each case. Remember this value is in milliseconds so 1000 = 1 second

Also, if you want to change the length of time the TV chooser takes to 'decide', change the delays at the start of the loop

Step 4: Thanks!

Thanks for checking out my instructable!

I'll make changes should I think of any. Feedback and edits are very welcome!

I hope to make a nice housing for this project if I get a chance, when I do I'll post the instructions for it here

Finally, here is a video of the TV Chooser in action! :)

I've also included the code that I used, 'TV_Chooser.ino', to help you when you're making your own TV Chooser

Automation Contest

Participated in the
Automation Contest