This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Sending Arduino data while using Phyphox editor
#1
Hi,
I am new to Phyphox and to bluetooth protocols in general. I would like to build an experiment in which I can send sensors data from Arduino to Phyphox and set up the experiment via the Editor, which has lots of useful features.

In the input tab I should choose a bluetooth input type and then specify some outputs: my issue is with the characteristic UUID of each output. Where do I get these UUIDs? Should I define them in the Arduino code and in case how (examples)? Is there detailed documentation on this stuff?

I only managed to find the 128-bit service UUID when connecting Arduino to Phyphox directly via bluetooth and scanning with the nRF Connect smartphone app, but not further than that.

Any help greatly appreciated.
Many thanks.
Mauro
Reply
#2
Hey Mauro,

are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a

We used these when initializing the server (GitHub).

Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".

Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.

Cheers
Dominik
Reply
#3
(01-09-2023, 11:09 AM)Dominik Dorsel Wrote: Hey Mauro,

are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a

We used these when initializing the server (GitHub).

Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".

Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.

Cheers
Dominik

Thank you Dominik,
I have one more question: I would like to send to Phyphox a series of data of a few seconds of duration in cycles, like I am recording a movement which is repetitive. So I  would like to see specifically the graphs regenerated from scratch and restart anew. How can I achieve this in the Editor?
Thank you,
Mauro
Reply
#4
You could erase the corresponding buffer by a clever use of the clear attribute. The simplest way is perhaps when it should happen on every run of the analysis block.
Reply
#5
(01-09-2023, 11:09 AM)Dominik Dorsel Wrote: Hey Mauro,

are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a

We used these when initializing the server (GitHub).

Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".

Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.

Cheers
Dominik

Hi Dominik,
I am really a beginner, so forgive me: I managed to send one value to one characteristic using the uuid you suggested. If I want to send two or more values with phyphoxBLE::write(val1, val2) for example, how do I need to configure the bluetooth outputs on the phyphox Editor? If I create two outputs with the same uuid as above I only get val1 repeated twice instead of having val1 and val2 in the two outputs of the Editor. Clearly, I have not fully grasped how the BLE device and the Editor really work in connection, so some help would be greatly appreciated.
Many thanks,
Mauro
Reply
#6
Dominik likely will not see your post until end of next week, so I (try to) answer your question.

The phyphox part for BLE is documented at https://phyphox.org/wiki/index.php/Bluetooth_Low_Energy. You need to provide an “offset” attribute so that phyphox finds the correct place of the value. If all values in a package should end up in the same buffer, then there is a “repeating” attribute in order to achieve that.
Reply
#7
Thumbs Up 
(03-22-2023, 03:45 PM)Jens Noritzsch Wrote: Dominik likely will not see your post until end of next week, so I (try to) answer your question.

The phyphox part for BLE is documented at https://phyphox.org/wiki/index.php/Bluetooth_Low_Energy. You need to provide an “offset” attribute so that phyphox finds the correct place of the value. If all values in a package should end up in the same buffer, then there is a “repeating” attribute in order to achieve that.

Thank you Jens!
Got it. Now it works!
Reply


Forum Jump: