Skip to content

mic159/Pong_Clock

Repository files navigation

Pong Clock

This is the Arduino code for 0miker0's Pong Clock. It can be purchased at Tindie.

Pong Clock

Schematics and further details of the hardware can be found at his website: 0miker0

Installing

To open the code in the Arduino IDE, you will need to make sure you clone this repository into a directory called "Pong_Clock" (case sensitive). Then you will need to make sure you have all the correct dependencies installed into the library folder.

To upload the code to the clock itself, you will need an FTDI cable set to 3.3v. Mike uses this one from sparkfun

Requirements

You can install them via the Arduino library manager.

Arduino SRAM

The 328p chip only has 2KB of RAM, so we need to be careful about what goes into RAM. The library for the display buffers the entire screen in RAM, which uses up half of it already (128 x 64 / 8 = 1024 bytes), so we dont have much to work with.

One of the other main uses of RAM is usually strings. To combat this, I have used PROGMEM strings everywhere, mostly by using the FlashStringHelper (the F macro) method.

Unfortunately, virtual methods on classes also use up a bunch of RAM, so I have some uglyness in Menu.cpp to do it all manually.