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.

Converting 20-byte int16 into 10 little endian values
(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).


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.

.phyphox   nrf52_with_10byte_buffer.phyphox (Size: 9.88 KB / Downloads: 342)

Messages In This Thread
RE: Converting 20-byte int16 into 10 little endian values - by hpm - 09-10-2021, 08:49 AM

Forum Jump: