Code Monkey home page Code Monkey logo

every-breath-you-take's Introduction

Every Breath You Take โ€“ Heart Rate Variability Training with the Polar H10 Monitor

Through controlled breathing it is possible to regulate your body's stress reponse. This application allows you to measure and train this effect with a Polar H10 Heart Rate monitor.

Heart rate variability, the small changes in heart rate from beat-to-beat, is a reliable measure of stress response. Heart rate variability reflects the balance between the two sides of the autonomic nervous system: the fight-or-flight response (from the sympathetic nervous system) and the rest-and-digest response (from the parasympathetic nervous system).

In any moment it is possible to restore balance to the autonomic nervous system by breathing slower and deeper. With every breath you take, you can set the pace of your breathing rate, measure your breathing control with the chest accelerometer, and see how heart rate variability responds.

Features

  • Connect and stream from a Polar H10, acceleration and heart rate data
  • Live breathing control feedback and adjustable pace setting
  • Track breathing and heart rate oscillations in real-time
  • Explore how heart rate vairability repsonses to different breathing rates

Installation and usage

python -m venv venv
source venv/bin/activate  # On Windows, use `my_project_env\Scripts\activate`
pip install -r requirements.txt
python EBYT.py 

Bundle into an application with pyinstaller:

pyinstaller EBYT.spec

The program will automatically connect to your Polar device. For best breathing detection, ensure the Polar H10 is fitted around the widest part of the ribcage, stay seated and still while recording.

Set the breathing pace with the slider (in breaths per minute), and follow the cadence as the gold circle expands and contracts. The blue circle shows your breathing control.

Track each breath cycle in the top graph, and how heart rate oscillates in repsonse.

Adjust breathing pace and control to target the green zone of heart rate variability in the bottom graph (> 150 ms).

Contributing

Feedback, bug reports, and pull requests are welcome. Feel free to submit an issue or create a pull request on GitHub.

every-breath-you-take's People

Contributors

kieranabrennan avatar ar-jan 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.