Git Product home page Git Product logo

pytindeq's Introduction

Python scripts to allow custom usage of the Tindeq Progressor from iOS devices and laptops.

The Tindeq Progressor has a fairly simple API, which allows for the creation of custom scripts and tools. In this repository I've provided some custom scripts to perform critical force tests.

Note: If you are looking for more functionality, and only want to run on laptops, I suggest looking at https://github.com/sebastianmenze/Tindeq-Progressor-climbing-strength-test-server, which is based on this code, but also includes more tests, and a workout mode.

The critical force test

The "critical power model" is widely used in endurance sports. The basic idea behind the model is there is some power output that is sustainable for long durations; this level is known as the critical power, and is related to an athlete's aerobic fitness. Interestingly, it seems to be the case that athletes also have a constant amount of energy that they can expend above the critical power - a finite battery for work about critical power. This used to be called the "anaerobic work capacity", but is now called W', since it's not clear that it is purely anaerobic.

For more info on the concept - have a look at this video.

Dave Giles at Derby University, together with the crew at Lattice training have done some work testing how well this model applies to rock climbing, and developed some tests to measure it. You can read their papers here and here

In this repository I've provided code for the "all-out critical force test" described in the second paper. You can use these scripts to do your own critical force testing and measure your aerobic and anaerobic performance, or you can use them as a starting point for writing your own custom apps for the Progressor.


# Running the scripts

The scripts are written in Python 3.

Laptops

You will need to install the dependencies, bleak and bokeh.

Then download the scripts in this repository. Click the green "Code" button and select "Download Zip". Once you've downloaded and uncompressed the zip file, you can run the tests by navigating to the "laptop" directory in a terminal. Wake up your progressor and type "python critical_force.py".

iOS devices.

For iOS devices, the scripts here are designed to be used with the Pythonista app.

Once you have Pythonista installed, download the code from this link. The iOS files app can uncompress the zip file. Copy the whole folder to the Pythonista folder in iCloud Drive and you should be able to run the code from inside Pythonista.

pytindeq's People

Contributors

owenhdiba avatar stuartlittlefair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pytindeq's Issues

Bluetooth connection

Hello good, it is not a problem what I have exactly. I recently did a project with arduino where I replicated a progressor, which is already functional and I've been using it for a few days. Now trying to find more uses for it, I found your code and tried to find a way to connect it. I am quite new to this and I am not very sure how to modify the code to be able to make it connect to other bluetooth, in this case to a hc05. It would be helpful if you have any information on how to change the code to achieve this. A greeting and thanks in advance.

IOLoop error

Hi,
I'm trying to get the critical force script to work on a MacBook Air (M2 Monterey 12.6).

at first there was a problem with the ports,

Traceback (most recent call last):
File "/Users/mnanao/PyTindeq-main/laptop/critical_force.py", line 223, in
server = Server(apps, port=5000)
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/bokeh/server/server.py", line 429, in init
sockets, self._port = bind_sockets(opts.address, opts.port)
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/bokeh/server/util.py", line 68, in bind_sockets
ss = netutil.bind_sockets(port=port or 0, address=address)
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/tornado/netutil.py", line 162, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 48] Address already in use

so I changed the port number. It then got past the binding stage but I have a different error that I can't find much on google about:

python3 critical_force.py
**Traceback (most recent call last):
File "/Users/mnanao/PyTindeq-main/laptop/critical_force.py", line 228, in
tornado.platform.asyncio.AsyncIOMainLoop().install()
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/tornado/util.py", line 276, in new
instance.initialize(*args, **init_kwargs)
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/tornado/platform/asyncio.py", line 299, in initialize
super().initialize(asyncio.get_event_loop(), kwargs)
File "/Users/mnanao/Library/Python/3.9/lib/python/site-packages/tornado/platform/asyncio.py", line 136, in initialize
raise RuntimeError(
RuntimeError: IOLoop <tornado.platform.asyncio.AsyncIOMainLoop object at 0x122aff1c0> already associated with asyncio loop <_UnixSelectorEventLoop running=False closed=False debug=False>

any ideas?
Thank you!
max

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.