Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Heart Rate Monitor → Thread

   

Heart Rate in VB.NET?

Rank

Total Posts: 4

Joined 2012-12-19

PM

Hi All,
I'm working on a VB project and need to obtain heart rate from my Garmin ANT+ chest strap. I don't have the coding skills to do the necessary work in C or C++. Thought I have done some fairly complex stuff in VB, I'm still a very amateur developer. I can anyone give me some guidance or point me to code that would allow me to do this simply? I have been pouring over the site and looking at the source code, but I't is way over my head.

Any help or assistance you are able to provide would be so very appreciated!

Reagan

     
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

You could try and search the Internet for C# -> VB translators. If I remember right, there are tools out there that can translate C# code to VB, i.e. to a language that you're fluent in.
Anyway, the most complex part of the code (not REALLY complex, btw) is the decoding of the device specific payloads from ANT+ messages. Reading the device profiles helps you to accomplish this (and covers other aspects like setting up the correct ANT+ communication parameters when setting up your app to receive data from different ANT+ sensors. Device profiles can be found in the "Downloads" part of this web site - when you're an ANT adoptor.

Cheers,
OMB      
Rank

Total Posts: 1

Joined 2012-12-25

PM

Hi,

I hope you mean VB.Net grin
Already downloaded Microsoft Visual Studio 2010 Express Edition?
Using the ant_net.ddl (it's c# but can be used with VB.Net)?

Greetings
Michel

     
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Michel - 27 December 2012 09:05 AM
Using the ant_net.ddl (it's c# but can be used with VB.Net)?

ANT_NET.dll can be used with any CLR language, C#, VB, ...
http://www.developerfusion.com/tools/convert/csharp-to-vb/      
Rank

Total Posts: 4

Joined 2012-12-19

PM

Thanks guys! I have called functions from DLLs before in VB, and yes, I'm using VB.NET, so I think I can get that figured out. I have located the profiles and think I understand the parameters and how they are used. I can get my strap talking to ANTWare_II. Can anyone point me to the simplest piece of code to start from? I tried to trace it through ANTWare II, but quickly got lost. Would the embedded reference design for HRM be a good starting point? I looked a that and am pretty intimidated by even that. I may be just setting my sights beyond my abilities....

Hope you will be patient with a sudo-programmer..... This stuff takes me 10 times longer than you guys who actually understand it!

Regards,
Reagan      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Hi Reagan,

According to the team here the best place to start is the Windows Library Package, as described here: http://www.thisisant.com/developer/ant/starting-your-project/ - look under creating a software application, and scroll down to "Developing ANT enabled applications".

Once you understand the libraries it may be easiest to work from the device profile document rather than the reference code, although the choice is yours!

Good luck!

Kat      
Rank

Total Posts: 4

Joined 2012-12-19

PM

Kat,
I'm trying to follow the following directions based on your input above:

To get started:
Download the ANT Windows Library Package with source code.
Unzip the file.
Open the ANT_Libraries.sln solution.
Open the ANT_LIB project, and find the antfs_host.cpp file
Enter the ANT-FS network key, or set it to all 0’s if you are not using ANT-FS.
Right click on the Solution ANT_Libraries and select “Build Solution”.
Run DEMO_LIB or DEMO_DLL. These are simple console applications that show how to configure and open an ANT channel.      
Rank

Total Posts: 4

Joined 2012-12-19

PM

Kat,
I'm trying to follow the following directions based on your input above:

To get started:
Download the ANT Windows Library Package with source code.
Unzip the file.
Open the ANT_Libraries.sln solution.
Open the ANT_LIB project, and find the antfs_host.cpp file
Enter the ANT-FS network key, or set it to all 0’s if you are not using ANT-FS.
Right click on the Solution ANT_Libraries and select “Build Solution”.
Run DEMO_LIB or DEMO_DLL. These are simple console applications that show how to configure and open an ANT channel.

I don't see a place to "Enter the ANT-FS network key" in "antfs_host.cpp", but it looks like there is a place in "antfsmessage.h". Am I reading this correctly?

Reagan      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Hi Reagan,

If you compile without entering the ANT-FS key you will see an error that will tell you exactly where to enter the key.

Kat