This is a bicycle computer, designed to count wheel revolutions using a cyclocomputer wheel sensor. It stores two trip meters and a speed histogram; the trip meters are reported in Morse code via a speaker, and the histogram can be saved to EEPROM and later printed over the serial connection.
(Mouse over text like this for elucidatory tooltips.)
See photos and a video along with discussion concerning the hardware construction (sewing) and use.
This work is licensed under a Creative Commons Attribution 3.0 Unported License; it is written by Mark Fickett. (Do let me know if you find it interesting or useful! Or, should you find bugs, a report or a pull request would be welcome.)
PIN_REV_SENSOR(12) — connected to a commercial cyclocomputer's sensor (chosen only because it was already on the bike)
PIN_SPEAKER(3) — a buzzer, originally the ringer on a cordless touch-tone phone
PIN_BUTTON_REPORT(2) — a momentary switch, easily triggered without looking (similar on sparkfun), originally from a VCR's circuit board
PIN_BUTTON_B(11 and 12) — LilyPad Button Boards, difficult to trigger accidentally
PIN_STATUS(13) — the built-in status LED
The status light blinks
K (dah-dit-dah, -.-) when
setup completes, then a short blink each time the wheel sensor is triggered. The trip meters are named (in Morse output)
dit-dit. Button inputs are either a tap (quick press and release), or a hold:
PIN_BUTTON_REPORTto hear the trip meters' values in Morse on
PIN_BUTTON_Bto reset the associated trip meter; the name of the trip meter and
SKare sent as confirmation.
PIN_BUTTON_REPORTto write the histogram values to serial output, formatted for R (see
PIN_BUTTON_Ato save the histogram to EEPROM. Before writing
Sis sent; then the status LED is lit during writing, and finally a
ditis sent after writing is complete. The histogram is always read from EEPROM on startup.
PIN_BUTTON_Bto clear the histogram. (This does not write the cleared histogram to EEPROM.) An
Xis sent as confirmation.
The Morse code output uses a Morse library for Arduino, the key feature of which is to allow monitoring an input (
PIN_REV_SENSOR) while sending Morse.