Software: I hacked on the Adafruit sample app that shows how to use the buttons and joystick, and created something close to the functionality I want.
Hardware: I stacked everything into a fat sandwich, held together by rubber bands, and voila! a prototype I could take to the track:
- Adafruit OLED display with controls
A couple of plastic standoffs (cut from a cheap ballpoint pen, attached by short pieces of twist ties)
Raspberry pi Zero with header
a piece of insulating plastic cut from the lid of an oatmeal container
Adafruit 2000mAh battery
Adafruit 500C Li-Poly Boost and Charger board
a piece of insulating plastic, ditto
I cut the micro-USB end off a short cable and soldered the wire end to the power out holes of the boost/charge board. Not beautiful, but easy to undo, and I can also unplug that and plug the pi into the mains whilst debugging, which I find I can only do when stationary
The trial was a success. I learned several things:
- this is quite a chunky - and surprisingly heavy - little object
my hand is big enough to comfortably hang onto it
I can both hold it and press the button with one hand
The buttons are small, with very little travel, so I sometimes wasn't sure whether a press had registered or not (I knew I hadn't when I pressed next time and had one lap of double length showed up
Here are some pictures. The specific features are subject to change.
The meanings of the numbers are:
Lap Time | average lap time | minimum lap time
Lap number | total number of laps | maximum lap time
By pressing button #5, you start the clock and also signal the end of each lap.
By pressing button #6, you pause the action - stop the clock - put things on hold (not yet working.)
By pressing the joystick in various directions (without pressing down) left, I can
- Left: page back through the earlier lap times
Right: page forward to a later lap time
Up: Go to the first lap
Down: go to the last/latest lap
By pressing the joystick down, and then also pressing in various directions, I can perform administrative functions:
- Left: BEGIN - throw away any data so far and start the session over
Right: WRITE the session's times so far to a csv file
Up: EXIT the program
Down: SHUTDOWN the pi
Here's some actual data: the first row is my real session, the second row is the fake one shown in the pictures.