Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Is it possible to stream ant+ sensor data live to Matlab?

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Darren Hague did a project 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 sensor data by reading the ANT+ HR profile spec and adapting the SpeedCadenceSensorRx.py code to suit.

https://github.com/dhague/vpower

https://www.thisisant.com/forum/viewthread/6665/

     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

What the simplest database to use with both Python and Matlab?

https://stackoverflow.com/questions/11058409/what-the-simplest-database-to-use-with-both-python-and-matlab
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Python as an alternative to Matlab, Windows to Pi with python, for a direct data access without using the web

https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=170788&sid=bc1e3742c8bc06228939d2bfc058283a

     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

deleted by yoyo2014      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Use the example code of Reto for this

https://infinityflow.ch/raspberry-pi-ant/
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

This instruction should also work without ethenet cable

https://raspberrypi.stackexchange.com/questions/70621/connecting-to-rpi-3-ad-hoc-network-from-windows-pc
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Here is the definition for "nerd" google translate gave to me

"a foolish or contemptible person who lacks social skills or is boringly studious"

Me personally, I would not choose "nerd" as part of my nick name on my Github.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

I think Raspberry Pi zero W is a good platform to develop live stream applications. It it possible to have a live stream to Matlab or Python via MQQT. A Raspberry Pi zero W with a 4400 mah battery is not much larger than a smartphone, and battery live is about 22 hours.

"I did some calculations and research and got at least 22 hours. According to https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=127210 with a 32GB SD card, composite video and a keyboard, the highest power consumed was 140mA, and with a 4400mAh battery, that's about 22 hours."

https://raspberrypi.stackexchange.com/questions/56455/raspberry-pi-zero-battery-life-with-4400mah-battery

And after a developing period on Matlab or Python, it should be possible to develop everyting to run on the Raspberry Pi zero W, and use it as a standalone device.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Here is the size of a battery you need for a windows mini pc stick:

https://www.cloudynights.com/topic/605251-mini-pc-powering-with-powerbank-minix/


     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Is it possible to work mqtt without internet connection?

https://esp32.com/viewtopic.php?t=2568

https://www.esp8266.com/viewtopic.php?f=6&t=15578

     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

Mosquitto ( open source message broker that implements the MQTT protocol) can run on a Raspberry Pi:

https://mosquitto.org/download/
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

There is no example how to stream ANT+ sensor data live to Matlab or Python to this date:

https://www.mathworks.com/matlabcentral/answers/518101-is-there-an-example-how-to-stream-ant-sensor-data-live-to-matlab?s_tid=prof_contriblnk      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

What you need for this:

1. Example code from Reto:

https://infinityflow.ch/raspberry-pi-ant/

2. install a MQTT brocker on the Rasperri:

https://mosquitto.org/download/

3. Connect to RPi 3 ad-hoc network from windows PC:

https://raspberrypi.stackexchange.com/questions/70621/connecting-to-rpi-3-ad-hoc-network-from-windows-pc

4. Connect to Matlab MQTT:

https://www.mathworks.com/matlabcentral/answers/300785-does-matlab-support-mqtt

5. connect to Matlab example code:

https://youtu.be/Ercd-Ip5PfQ

6. Or connect to Python MQTT:

https://pypi.org/project/paho-mqtt/

7. connect to Python example code:

https://www.youtube.com/watch?v=GIywmJbGH-8





     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

With the above instruction, a Rasperry PI zero, a 4 800 mha akku which lasts up to 22 hrs, a bluetooth keyboard and this display (the display also has three hardware buttons and a joystick, you don t need urgently a keyboard)

https://www.ebay.com/itm/1-44-inch-LCD-display-HAT-for-Raspberry-Pi-4-3-2-Zero-W-WH-128x128-pixels-SPI/272969126224?hash=item3f8e3a5150:g:g9UAAOSwTO9aJhHg

you can build your own watch with your own operating system, which fits for your needs grin.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 234

Joined 2018-09-10

PM

In the Maltab community, someone threatens to delete all of my posts which do not relate to Matlab:

https://www.mathworks.com/matlabcentral/answers/394287-is-there-a-matlab-function-to-read-in-a-fit-file-from-a-garmin-device#answer_428282?s_tid=prof_contriblnk

In the Garmin community, someone already deleted my posts without giving any reasons in the forum

https://www.dcrainmaker.com/2016/07/everything-you-ever-wanted-to-know-about-ant-fe-c-and-bike-trainers.html/comment-page-1#comment-3557947

For all those facing the same problems I have, there is also a remote desktop solution for the Rasperri PI in Python:

https://www.youtube.com/watch?v=IDqQIDL3LKg


     

Signature

Peter Gamma