Skip to content

Tracking the distance small animals run in their wheels

License

Notifications You must be signed in to change notification settings

TravisFennel/Wheel_Runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wheel_Runner

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.

Requirements: Raspberry PI, Door Sensor, Mysql Environment.

Setup:

  1. Install screen, python, and apache on a Raspberry PI

  2. Copy the Web_Interface files into apache's /var/www/html folder.

  3. Change the values in config.php to match your environment.

  4. Copy the Wheel_Tracker files into the Linux home directory

  5. Change the web address in 'chiprunner.py' to match your IP address on line 22.

  6. Shut down your raspberry PI, and attach the leads of the door sensor to GPIO Pins 3 and 4.

  7. Run chiprunner.sh, and optionally add it as a daily cron job

  8. 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.

About

Tracking the distance small animals run in their wheels

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published