Clock based on the retro game PONG



Description
This clock uses a 480x320 TFT LCD screen and an RTC module controlled by an ESP32-C3 super mini CPU board.

The default screen shows the game 'pong', auto played by the CPU, where the score shows the actual time. The user interface is based on the touchscreen of the LCD board MSP3520. When the default screen is touched a month overview, including week numbers is shows. In this overview you can navigate to the previous month(s) or next month(s). Furhter a button is shown to access the settings window. In the settings window you can set the date and time. Later a sound module is added, in the settings you can chose for a 'speaking clock' or a defined sound to mark each hour and/or half hour.

The software is build using Visual Studio Code and PlatformIO.

The case is built from 3mm plywood. The parts are cut by a laser cutting machine (xTool S1). The frame around the display is 1mm bamboo. The case is designed using Autodesk Fusion 360.

The used tools (VS Code, Platform IO, Autodesk Fusion 360) are free to download for non commercial use.

Below you find download links to zip files containing the clock software and the files to cut out the case parts.

Note: The software uses a platform.ini file. This file is responsible for downloading the (by version controlled) library files.
These library files are not packed in the download file itself, which creates a 'non complete package'. Personally I do not like that approach, but this is the way PlatformIO / Arduino thinks about a 'proper setup of a project'. Thus the source has external dependencies by this .ini file, which in my opinion is not optimal related to code security and maintainability. The software can suddenly brake because of external changes or even availability, my worst nightmare in engineering.

The clock can be extended with other functionality:
- Birthday calendar
- Holiday information
- Alarm or multiple alarms
- Use the touch screen to play the game against the CPU
- More settings: ball speed, backlight control, display auto dim based on time or LDR or both
- Cook timer, stopwatch, ...
 

Schematic


Note: The MISO pin of the LCD is not connected. According to info on the internet this pin cannot go into tri-state, which would be a conflict if it was connected to the use touchscreen MISO pin. The info from the touch screen is needed, there is no info read from the LCD, therefor this unconnected pin is not an issue, and there is no need to use two SPI interfaces.....


Download items

Software
The download file contains the content from the VS Code project directory.

Advice:
1) Create a new project in PlatformIO running inside VS Code.
2) Select the board: "Espressif ESP32-C3-DevKitM-1".
3) Copy the files from the zip file, take over at least the content of the "src" folder and the "platformio.ini" file (lib dependencies).


DOWNLOAD: Download code ZIP file



Case
The case is build from these files:
File Description
back_layout.svg Case backside
bottom_layout.svg Case bottom
front_layout.svg Case front
side_L_layout.svg Case left side
side_R_layout.svg Case right side (Flip this file before laser cutting to have the 'outside' on top)
top_layout.svg Case top
USB_mount_layout.svg Additional piece to mount over the USB hole on the backside
mount1_layout.svg Optional, cut 8x, glue 2 on top of eachother. The 4 parts can be glued on the bottom
to mount the PCB on (4 screws). Location based on USB port and CPU board.
holder_bottom_layout.svg Touch screen pen holder, glue on the Right inner side at the bottom of the front hole
Cut this part 3 times and glue them on top of each other
holder_top_layout.svg Touch screen pen holder, glue on the RIght inner side at the top of the front hole
Cut this part 3 times and glue them on top of each other
holder_L_layout.svg Touch screen pen holder, glue on top of the previous items
LCD_border_LR_layout.svg Border around LCD at front side. Print this part 2x (Left and Right)
LCD_border_TB_layout.svg Border around LCD at front side. Print this part 2x (Top and Bottom)


DOWNLOAD: Download case ZIP file


For more information about the construction of the case see this page.