Posts: 2
Threads: 1
Joined: Sep 2021
09-09-2021, 02:46 PM
Hi there,
I am writing an experiment with a BLE characteristic that indicates 20-byte int16 values at once. I am trying to convert them into 10 little-endian values but I am struggling to do so using the phyphox editor as I have no experience with XML
I've tried setting the length to 20 bytes (shown in picture) but it seems to be only converting the first two bytes.
Could someone point me in the right direction please? Much appreciated!!
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
Hi hpm,
the output tags for bluetooth input do not support arrays, so you need to individually define each of the 10 values. The offset attributes have to be altered accordingly. (0, 2, 4, … for two byte values).
HTH
Posts: 2
Threads: 1
Joined: Sep 2021
(09-09-2021, 06:51 PM)Jens Noritzsch Wrote: Hi hpm,
the output tags for bluetooth input do not support arrays, so you need to individually define each of the 10 values. The offset attributes have to be altered accordingly. (0, 2, 4, … for two byte values).
HTH
Hi Jens,
Thank you so much for the reply,
I have tried to individually define each of the 10 values where each value is representing an acceleration reading that I gathered. I am now able to generate these acceleration values successfully, but when I tried to add a time value to each of the 10 readings I encountered some more problems.
I generated the first time value by setting the 'extra' field in one of the output buffers to 'time'. For generating time values for the rest of the 9 acceleration readings I tried adding a small time increment each time (0.001 second) using the 'ramp' module. Then when I tried to plot the acceleration readings against time values I get really weird results as shown in the picture. The time values generated seemed to be repeating themselves and my guess was that there's something wrong with clearing the buffers. So I tried various combinations of clearing the buffers but none of them seemed to be working.
Would you mind pointing me in the right directions again on how to add time values in the editor please? Thank you again for helping me!!
I have also attached my phyphox experiment file here if it helps.
nrf52_with_10byte_buffer.phyphox (Size: 9.88 KB / Downloads: 416)
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
These have been busy two days. There should be time to look into it tomorrow/Tuesday. Could you add an export block and provide us the collected data?
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
Please note that your analysis block continuously runs even if there is no new data. I am not yet entirely sure of the consequences for the graph. A .csv of the data could really help.
BTW, there is now a “repeating” attribute in the “input” element for such cases, see
https://phyphox.org/wiki/index.php?title...Low_Energy, however, it is not (yet?) supported in the editor.