phyphox Forums
Sending Arduino data while using Phyphox editor - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: General (https://phyphox.org/forums/forumdisplay.php?fid=3)
+--- Thread: Sending Arduino data while using Phyphox editor (/showthread.php?tid=1668)



Sending Arduino data while using Phyphox editor - mprof9 - 01-05-2023

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


RE: Sending Arduino data while using Phyphox editor - Dominik Dorsel - 01-09-2023

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


RE: Sending Arduino data while using Phyphox editor - mprof9 - 01-13-2023

(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


RE: Sending Arduino data while using Phyphox editor - Jens Noriʇzsɔɥ - 01-16-2023

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.


RE: Sending Arduino data while using Phyphox editor - mprof9 - 03-21-2023

(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


RE: Sending Arduino data while using Phyphox editor - Jens Noriʇzsɔɥ - 03-22-2023

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.


RE: Sending Arduino data while using Phyphox editor - mprof9 - 03-22-2023

(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!