Raspberry Pi Zero Pong Clock

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

Hardware setup

This project utilizes a lesser-known feature of the Raspberry Pi Zero: its analog video output. There is a two-pin header on the Raspberry Pi Zero labeled "TV." To connect the Raspberry Pi Zero to the analog input of a TV, solder two wires from these pins to an RCA-style plug. The pin adjacent to the "TV" label on the Pi Zero serves as the video output, while the pin next to it is the ground.

Software setup

Install the Raspberry Pi OS on the SD card

Instructions for this process can be found on 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 established, you will need to configure the Pi Zero to output video through the analog output. By default, the Pi Zero outputs video to the HDMI connector.

To make this change, you will need to edit the config.txt file. You can do this by connecting an HDMI monitor to the Pi Zero or, if the Pi Zero is connected to the network, by logging in via SSH.

Open the config.txt file in your preferred text editor, and make the following changes:

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. Connect the RCA cable to the TV, then power up the Pi Zero to display video on the screen.

Install the Py Pong Clock

1) Ensure that the locale and timezone are set in raspi-config.
2) Download the Py Pong code from the following link: https://bitbucket.org/donclark/pypong-clock/.
3) Run the command: python pypong-clock.py.
(terminal image)

Watch the clock in action