Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Raspberry Pi Project

Rank

Total Posts: 4

Joined 2016-12-23

PM

I'm a teenager currently trying to make a raspberry pi project that will tell you your heart rate and potentially flash an LED in time with your heart rate. I have a garmin heart rate monitor and an ant+ usb which I am intending on using with the raspberry pi to make the project. I was intending on using python as the programming language but was unsure as to how I could obtain the data transmitted from the heart rate monitor to the ant+ usb or even how to connect these two items. Any advice on how to accomplish this would be very much appreciated as I have little experience in this field and would like to make this project a reality.
Thanks,
Thomas.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi Thomas,

I'd recommend getting a little familiar with ANT using ANTware II, and playing with ANT channels first. You can follow the channel parameters in the ANT+ Heart Rate Device Profile to connect to the strap using a slave channel.

For the coding, there are a couple open source libraries out there (including the one on the downloads page) which support the ANT USB Stick. Here's one example of a developer who used a Python library to do so.

Good luck!
Harrison      
Rank

Total Posts: 4

Joined 2016-12-23

PM

Thanks for the reply Harrison. I'll get familiar with the software you recommended over the next few days. I have been looking at the project which you put a link to a little bit, and noticed that they used the Suunto Movestick Mini as their ANT+ device to receive the data. I have the standard ANT+ USB that comes with garmin devices, and not the Suunto version. I assume that I will be OK to use this for my project, but just use the idProduct number which is different for my ANT+ USB?      
Rank

Total Posts: 4

Joined 2016-12-23

PM

I've now managed to use the simulANT+ program to allow me to see my HR data on a laptop running windows 10. How would you recommend that I do this on the Raspberry Pi now and then use python to extract this data and use the heart rate data as it is transmitted to the Pi? At the moment I'm still not particularly experienced with the Raspberry Pi 3 and couldn't seem to get the program on the Johannes Bader website to work. I couldn't get the ANT+ USB stick to make a /dev/ttyUSB0 node (I'm unsure of what this means) and then the program wouldn't work. At the moment I'd just like to be able to see my heart rate on the Raspberry Pi using the ANT+ USB stick and Garmin HR Monitor as I should be able to finish the rest of the project from there. However, I'm unsure as to how I can connect them using the Python library. Sorry if this is basic but I really am a beginner in this field.
Thanks,
Thomas.

     
Rank

Total Posts: 3

Joined 2012-12-09

PM

Hi Thomas,

I did a project over the holidays to use Python with a Raspberry Pi and ANT+ stick to read bicycle speed and write bicycle power. You should be able to use it as a template to read HR data by reading the ANT+ HR profile spec and adapting the SpeedCadenceSensorRx.py code to suit.

Here's the project if you want to try it out: https://github.com/dhague/vpower

Good luck,
Darren      
Rank

Total Posts: 4

Joined 2016-12-23

PM

Hi Darren,

Thanks a lot for that link, I'll give it a go! I assume you didn't have to create a udev rule or anything like that, just plug the ANT+ USB stick in?

Cheers,
Thomas      
Rank

Total Posts: 3

Joined 2012-12-09

PM

Yes, exactly - in Ubuntu 16.04 (PC) and on Debian Jessie (Pi) it just worked, no udev rules. I did have to run the program with "sudo" though.