Using the $5 Raspberry Pi Zero and a $5 thrift store TV, I built this Py Pong Clock.
Hardware required
- Raspberry Pi Zero
- Raspberry Pi power supply
- Micro SD card
- TV with an analog video input (usually this is an RCA jack)
- Wires and an RCA plug to run video from Pi Zero to the TV’s analog input
Software required
- Raspberry Pi OS installed on the Micro SD card
- Py Pong: A clock that plays pong, built for the Raspberry Pi.
https://bitbucket.org/donclark/pypong-clock/
Hardware setup
This project uses a little known feature of the Pi Zero, the analog video output. There is a two pin header on the Raspberry Pi zero labeled TV. Solder two wires from these pins to an RCA style plug to connect the Raspberry Pi Zero to the analog input of a TV. The pin next to the "TV" marking on the Pi Zero is the video output and the pin next to it is the ground.
Software setup
Install the Raspberry Pi OS on the SD card
Instructions for doing this can be found at the Raspberry Pi OS website: https://www.raspberrypi.com/software/
Configure the Pi Zero for analog video output
Once the connection from the Pi Zero to the TV is hooked up. You will need to configure the Pi Zero to output video to the analog output. By default the Pi Zero outputs video to the HDMI connector.
To do this changes will need to be made to the config.txt file. This can be done by connecting an HDMI monitor to the Pi Zero to make the changes or if the Pi Zero is connected to the network, log into the Pi Zero using SSH.
Open config.txt in your editor of choice, here are the changes that need to be made.
1) Remove the comment ‘#’ from the following line:
# sdtv_mode=2
It should look like this:
sdtv_mode=2
2) Add a comment ‘#’ to the following line:
hdmi_force_hotplug=1
It should look like this:
# hdmi_force_hotplug=1
Save the file and power down the Pi Zero. Plug the RCA cable into the TV and power up the Pi Zero to see video on the TV.
Install the Py Pong Clock
1) Be sure the locale and timezone are set in raspi-config
2) Download the Py Pong code from here: https://bitbucket.org/donclark/pypong-clock/
3) Execute the command Python pypong-clock.py
(add image of the terminal)