Tracking the distance small animals run in their wheels
You can access my hedgehog's live data here. -- Note, Chip has passed, and this server is no longer maintained.
I made this as there were no really good ways to track how far my hedgehog runs at night.
My live demo is contained on a raspberry PI, using a magnetic door sensor to track the wheel revolutions.
Setup:
-
Install screen, python, and apache on a Raspberry PI
-
Copy the Web_Interface files into apache's /var/www/html folder.
-
Change the values in config.php to match your environment.
-
Copy the Wheel_Tracker files into the Linux home directory
-
Change the web address in 'chiprunner.py' to match your IP address on line 22.
-
Shut down your raspberry PI, and attach the leads of the door sensor to GPIO Pins 3 and 4.
-
Run chiprunner.sh, and optionally add it as a daily cron job
-
Test that it works by manually spinning the wheel, and refreshing the page to make sure the values are updated.
Known issues: The python script freezes up after roughly 30 hours. I use a daily cronjob to restart the script every 24 hours in a screen session.
0 18 * * * /home/pi/chiprunner.sh
@reboot /home/pi/chiprunner.sh
Note: A sample file is provided so you can up your database similar to mine.