Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kdahlhaus/easy-erg
An easy to use C++ wrapper for the Concept 2 Software Development Kit for interfacing with their rowing ergometer.
https://github.com/kdahlhaus/easy-erg
concept-2 cpp ergometer rowing wrapper-library
Last synced: about 2 months ago
JSON representation
An easy to use C++ wrapper for the Concept 2 Software Development Kit for interfacing with their rowing ergometer.
- Host: GitHub
- URL: https://github.com/kdahlhaus/easy-erg
- Owner: kdahlhaus
- License: other
- Created: 2014-01-30T04:40:30.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-21T01:56:24.000Z (over 7 years ago)
- Last Synced: 2023-04-09T19:18:05.991Z (over 1 year ago)
- Topics: concept-2, cpp, ergometer, rowing, wrapper-library
- Language: C++
- Size: 611 KB
- Stars: 12
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
easy-erg - a C++ Wrapper for the Concept II Rowing Machine Interface
====================================================================
Copyright 2014 by Kevin Dahlhausen ([email protected])Overview
--------
This package contains a C++ library and demonstration files that make working with the Concept 2 Software Development Kit (http://www.concept2.com/service/software/software-development-kit) easy. This library runs against the (latest as of writing) version of the API - the one with documents labeled version 0.14::ErgNet net = ErgNet();
int numErgs = net.discoverErgs();
Erg erg = Erg(0); // could actually be a PM3, PM4, or PM5
ErgState state;
while (1)
{
erg.updateState(&state);
cout << "power: " << state.watts << " (watts) "
<< "numStrokes: " << state.numStrokesIn
<< " meters/stroke: " << state.metersPerStroke
<< "\n";
}License
-------
This software is licensed under the Mozilla Public License V 2.0. See the file 'LICENSE.txt' for full details, but my intent is that:* You can use and modify this library freely in private, open-source, and closed-source commercial software.
* You disclose any changes you make to this library (pull-requests are ideal).
* You do not need release the source to your own software that uses this library.Should you not wish to use the software under the Mozilla Public License, please contact Kevin Dahlhausen ([email protected]) to discuss alternative licensing.
Building and running the demo programs
--------------------------------------PREREQS:
.......
1. version 1.24 of the Concept 2 Software Development Kit
2. cygwin with g++
3. dlltool installed
4. pexports installedSteps
.....
1. Extract the concept 2 SDK and set the environment variable 'CONCEPT2SDK' to point to the directory that contains the DLL's and .h files.
2. run "make"
3. connect a Concept 2 ergometer via USB
4. cd to demo
5. run demo.exe or any of the other demonstration files there.Runnng the Tests
----------------
1. Install GoogleMock (https://code.google.com/p/googlemock/) somewhere.
2. Point GMOCK_DIR (test/Makefile.test around line 24) and GTEST_DIR (test/Makefile.test around line 20) to the installation.
3. make all testsUsing in your own code
----------------------
The command line would be something like this:g++ -mno-cygwin -I../easy_erg/build -I../easy_erg/lib/sdk/PC -L../easy_erg/build my_app.cpp -lEasyErg -lRPPM3USB -lRPPM3DDI
You also have to copy the DLL's from the demo directory to some directory on the path or where the new program resides.
ToDo / Notes
------------
* Average watts is calculated by sampling power at a fixed rate independent of the position or timing in the stroke. We might want to tie it to a position in the stroke.