Coder Social home page Coder Social logo

developerhealth-ant-garmin's Introduction

developerhealth

This was created for leedshack 2012. The code is rough, and it requires arcane bits and pieces that just happened to work on the day. Patches gleefully accepted.

The Idea

The idea for this was that some code can make you angry. Find out how angry by graphing your heart rate against your git commit times, and know how much the average increased. It also gained a bit of lolcommits, as it will take your picture as you commit, and use OSX Location Services to find out where you were when you commited.

The Pieces

HRM

This is a small daemon that uses python-ant to talk to an ANT+ Heart Rate Monitor (such as the Garmin HRM chest straps) via a USB ANT+ Device (such as the Garmin ANT+ stick, or the Suunto Movestick Mini, which I used). It constantly runs, and pushes a value every 10 seconds into a mongodb database. Currently only working on a linux host.

GIT

This is a post-commit hook that posts the available data to the web section. The address to post to is at the bottom of the file. It also requires get-location to be available on your path. It will only run on OSX. Patches to make it work on Linux gratefully accepted.

WEB

This is the main website. It uses Flask as the server, and mongodb, jquery and flot for the data storage and viewing.

SD

A bonus server density plugin that will take the values that the HRM daemon has put into mongodb and post the values to server density. Requires the SD agent installed and configured for plugins.

Installation

The installation requirements for this were very changeable during the course of the 24 hour hack, so it's entirely possible that there's bits missing, or wrong. I'll try and confirm and tidy it up when I get chance

Dependencies

This is the dependencies that will not be installed using pip.

  1. MongoDB
  2. Python 2.7
  3. get-location
  4. python-ant

Client Installation

On your OSX Client:

  1. Compile and put get-location somewhere on your path.
  2. Put the git/post-commit file into .git/hooks
  3. Edit the post-commit file url to point to your host

Host Installation

On your linux host

  1. Checkout, and install python-ant
  2. pip install -r requirements.txt
  3. Install and ensure mongodb is running
  4. run python web.py from the web folder
  5. Visit http://localhost:5000

developerhealth-ant-garmin's People

Contributors

tomwardill avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.