I wrote this quick app to monitor the distance and wheel speed of my flying squirrel on his wheel. A simple magnetic contact switch is used on the base to trigger with a neodymium magnet on the wheel itself.
Raspberry Pi Model B
Calculate wheel circumference for correct speed.
A quick script to email total daily distance run.