Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-hhh committed Nov 10, 2017
0 parents commit 9c377e8
Show file tree
Hide file tree
Showing 22 changed files with 4,153 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Visual Studio files
*.suo
*.ncb
*.db
*.user
*.pdb
*.idb
*.xss
*.xsc
*.xsx
ipch/
*.sdf
*.opensdf
.vs/

# Editor specific files
*.*~
*.~*
*.swp

# Git temporary merge files
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*.orig
*.orig.meta
*.pdb.meta
Thumbs.db.meta

# oother
*.exe
*.ilk
Debug/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Read data and control a bike trainer

This is a server application allowing to read data from ANT+ devices and
sending them over to a TCP connection. It can currently read heart rate from
an ANT+ HRM and read power, speed and cadence from an ANT+ FE-C trainer (most
recent trainers support this). It can also control the resistance of the
trainer by setting the slope.

## Building the application

The application is built on a Windows platform using Visual Studio 2017 (the
Community Edition will work fine). It could be easily ported to Linux as
well, but this hasn't been done yet.

Download the libusb windows DLL's from the [libusb](https://libusb.info) web
site and unzip the archive somewhere.

Set the `LIBUSB_LIB_DIR` and `LIBUSB_INCLUDE_DIR` environment variables to
point to the include and lib directories for libusb. For example, if the
archive was unzipped at `c:\libusb-1.0.21`, we have:

* `LIBUSB_INCLUDE_DIR` pointing to `c:\libusb-1.0.21\include`

* `LIBUSB_LIB_DIR` pointing to `c:\libusb-1.0.21\MS32\dll` (point it to the 64
bit if building a 64 bit application)

Open the `vs2017/TrainerControl.sln` solution and build it (if you opened it
before setting up the environment variables, you will need to re-open it).

The resulting executable will be in the `Debug` or `Release` folder. You will
also need to copy the actual libusb dll file, `libusb-1.0.dll` in that folder.

## Running the application

To run the application, open a command window and type:

./TrainerControl.exe

The application will try to find the ANT+ USB stick and connect to the heart
rate monitor and bike trainer. It will also accept TCP connections on port
7500.

Loading

0 comments on commit 9c377e8

Please sign in to comment.