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.

Device for experimental physics teachers
Hey everyone,

thanks for sharing this observations!

Your "first"-approach could work but i see there some problems which might cause the data loss. Im not sure but i think the analysis loop is running independent from the incomming bluetooth data. This means it could be possible that you get 2 new values into CH1 container while your analysis is currently running. At the beginning of the next analysis run phyphox will take the first value and clear the second one.
You could proof this with sending continuous data, so first value = 1 second value = 2 and so on. If for example value 3 & 4 will be received at roughly the same time during a analysis loop your routine  should take value = 3 and clear value = 4.

Another approach would be using the append function. With this you could append multiple values to your "allData" container.

The 4-data-package observation looks like you are using an iPhone ;-) Bluetooth Low Energy is able to send more than 1 data packet per connection interval. The number of packages is limited to 4 by iOS and to 6 by Android. Since your already at the maximum of packages per connection interval I assume that you are limited due to the connection interval. (This is just a rough summary, more details can be found in the already mentioned article : )

To play around with the connection parameters I implemented a feature to set these values within the phyphox library. You can find this version here:

You might should uninstall the official version of the phyphox library first! Afterwards you can download my version as zip and add it via "sketch" - "add library" - "add Zip Library". I also added the example "connectionParameter" where i decreased the connection interval.
In general you have to set a min and max connection interval value. For me it looks like phyphox always choses the max value (right now i dont know if its possible to change this behaviour). 
You can check the actualy used connection interval with the android app "nrf connect". For me it looks like the iOS version does not have this feautre.. but maybe i just couldnt find it.


Messages In This Thread
RE: Device for experimental physics teachers - by Dominik Dorsel - 09-11-2020, 09:23 AM

Forum Jump: