In this project, we will wire in a sensor and add a program that I made myself, so that our TVs greet us when we walk in the room. However, make sure that you have done my previous tutorial that teaches how to use an Arduino clone with a TV, and my first one, which teaches how to get set up with an Arduino clone.
WARNING: ATTEMPT AT YOUR OWN RISK! I have found that my Arduino clone is partially dysfunctional (will run TV and LED, but not speaker or LCD). Here are the parts that you will need. They are, from left to right, a 6 or 9 volt battery pack, misc. wire, an Arduino clone, a breadboard, and a 7805 voltage regulator.
Next, let's hook up the battery pack. Put the positive (red) probe into the same row as the far left pin of the 7805, and put the negative (black) probe into the negative bus (the line of pins with the blue line over it). Also, run a wire from the row with the middle pin of the 7805 to the negative bus, and run a wire from the right pin to the positive bus.
Nice job! The LED on the board should light up. If it doesn't, make sure that you have done all of the steps correctly, and that you soldered your clone correctly. Now, assemble a "parallel programmer," which is a device that hooks into a Windows or Linux computer (if it originally ran Windows) that will program this device. If you have a AVRISP or other programmer, then use that instead. Here is how to build a parallel programmer.
Now to working with the computer. On Windows, open Program Files, open the Arduino folder, and go into /hardware/Arduino/boards. (For Mac, check Applications, and for Linux, check where you installed it). Now, add this to the bottom of the file (retype it, it doesn't copy correctly).
Finally, open the Blink program in the IDE (Open button, Basics, "Blink"), and download it onto the Arduino clone (Download button). If you are lucky, then you should be able to unplug the parallel programmer, and the LED should blink! Note: if you got any errors, make sure that the parallel programmer is not touching anything on your board and that you followed these steps correctly.
Congratulations! Look at the Arduino sample code and the tutorials on this website. For future reference: the pin that says "B0" = pin 8, "B1" = pin 9, etc.
Connect the 470 ohm resistor to digital pin 7 (D7), and the 1k ohm one to B1, or pin 9. Make their other ends go into the same unused row off to the side (sorry that the LED assembly is still on there in the picture).
Program the Arduino clone, as in the previous project, with the NTSC demo code that comes with the TVout library, available here. (To install the code, just click the Open button in the Arduino IDE, and go to "TVout." Click on the code that you want to open. Then click the download button.)
Now, hook the yellow RCA cable up to the yellow input on your TV, and turn your TV to channel 2 or 3, depending on your TV. An image should appear, and your project should work! To restart the video, press the reset button on your Arduino clone.
We'll assume you're ok with this, but you can opt-out if you wish.