0

How can I read out sensor data in real-time from a Clue to a
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How can I read out sensor data in real-time from a Clue to a

by Peter_Gamma on Tue Jun 02, 2020 5:45 pm

The Pyloton open source bike computer is based on the Clue. I want to reat out heart rate sensor data from to Clue to a PC. How can I read out sensor data in real-time from a Clue to a PC?

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Wed Jun 03, 2020 4:00 pm

Arduinos can be connected to Matlab or Python through usb, and there are examples available for instance on youtube how to control an Arduino from a PC. I ve read somewhere, that the Clue is Arduino compatible, is that correct?

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 8:05 am

Here

https://www.hackster.io/news/get-a-clue ... 01884a7a28

it says, you can expect Arduino IDE compatibility of the Clue. Does that mean I can connect for instance over usb with the same software to the Clue as to an Arduino?

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by adafruit_support_bill on Tue Jun 09, 2020 8:11 am

Yes, the Clue is Arduino compatible. Instructions for setting it up in the Arduino IDE can be found in the documentation: https://learn.adafruit.com/adafruit-clu ... O1NnbnIkLw

You can send data to your PC via the same USB/Serial connection used to program the board.

adafruit_support_bill
 
Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 8:26 am

Thank you, adafruit_support_bill, for your answer, that s great.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 10:37 am

Thank you for your answer. Therefore it should be possible to have a Serial Connection between Arduino UNO to Matlab via USB:

https://www.youtube.com/watch?v=ymWXCPenNM4&t=43s

for instance to read out BLE sensor data from the Pyloton Open Source Bike Computer to Matlab.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 10:43 am

If it works, the Pyloton would probably be the easiest way to stream BLE sensor data to Matlab:

https://www.mathworks.com/matlabcentral ... contriblnk

It only needs a bridge code and a proof that it works.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by adafruit_support_bill on Tue Jun 09, 2020 10:55 am

We are not Matlab experts and have not tested that configuration. But the Clue supports standard Arduino Serial communication via the USB port.

adafruit_support_bill
 
Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 11:06 am

Thanks.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Tue Jun 09, 2020 11:58 am

I was looking for most suitable devices for meditation and meditation research. I found out that Bike computers are the most suitable devices. :-)

The Garmin Varia Vison insight display which is great for meditation works best when connected to a Bike computer.

And meditation research as done by Richard Davidson and the Dalai Lama looks promising with BLE sensors, Matlab and the Pyloton Open Source Bike Computer :-).

Or when we look for low cost-high quality devices. Then it looks most promising with BLE sensors, desktop Python heart rate analysis software and the Pyloton bike computer :-)

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Wed Jun 10, 2020 4:39 am

Here is an example of an USB communication between Arduino Uno & PC using Python, which eventually also could be used for reading out sensor data from a Pyloton Bike Computer:

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

The example shows how to send sensor data from PC to Arduino over usb. Unfortunately, I did not get an answer from the author of the youtube video, whether it is possible to use this example also to read out sensor data from an Arduino.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by kevinjwalters on Fri Jun 19, 2020 10:28 am

I've not used it for a while but I have GNU Octave installed. It looks simple to do with the instrument-control package and there are a few examples floating around t'internet. Two notes of caution: the naming syntax on Windows is very unusual (s1 = serial("\\\\.\\COM10");) and some examples are incorrect; when I tried it half my USB serial ports stopped working and could only be recovered by rebooting Windows, YMMV.

kevinjwalters
 
Posts: 837
Joined: Sun Oct 01, 2017 3:15 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Fri Jun 19, 2020 10:37 am

Great package. Many many thanks.

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Wed Jun 24, 2020 6:14 am

But also in Python, there are great analysis tools, like the Python Heart Rate Analysis Toolkit:

https://www.google.ch/url?sa=t&rct=j&q= ... 4Nie4rpwq0

Sensor raw data could be helpful for calculating heart rate variability, and it is also necessary for estimation of respiratrory rate in Matlab. But do I get raw sensor data from the Pyloton bike computer?

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Re: How can I read out sensor data in real-time from a Clue

by Peter_Gamma on Wed Jun 24, 2020 6:30 am

For heart rate variability or respiratory rate estimation ECG peaks or PPG peaks are needed. Polar OH1 or Polar H7 BLE sensors for instance can be used for such calculations, as shown by the Polar HRV logger:

https://play.google.com/store/apps/deta ... ri_monitor

but do I get heart sensor raw data out of the Pyloton?

Peter_Gamma
 
Posts: 24
Joined: Tue Jun 02, 2020 5:38 pm

Please be positive and constructive with your questions and comments.