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
#2
Hey Gautier,

your code looks quite good so far. To write your configuration data once after a connection is established you just have to replace the "input" tag on the bluetooth output to "config".
Furthermore you should add an "id" to both bluetooth blocks. If the bluetooth in- and output have the same id phyphox knows that they belong to one device.
Unfortunately I cannot test my changes until tomorrow. So if its not working out of the box I might messed something up here.

EDIT: Well I messed something up and figured out that something is not working as intended. Right now it looks like phyphox is not writing the container value to the caracteristic... In the version below i did not write the value of the container "choice" but wrote a value directly to the arduino. This should fulfill your desired purpose and adds another point on my todo-list Sad . 

The data transmision rate is little complex topic. If you are interested in some of the details I can recommend this article:

https://punchthrough.com/maximizing-ble-...d-android/

My practical experience: I was able to get up to 100Hz with a pixel 2 and Arduino Nano 33 BLE (my Smartphone was closeley to the Arduino). This rate is also not very reliable due to package loss etc. A rate of 50Hz is much more stable and thus usable for experiments. I have to admit my data rate test was without our library some months ago. I should test this again with our library, there might be some room for improvement on the library side.

You should also consider the data rate of the pressure sensor. The pressure sensor for example is one of the "slower" sensor with a maximum rate of 75Hz
(Datasheet: https://content.arduino.cc/assets/Nano_B...ps22hb.pdf)

Some currently possible workaraounds are:
- buffer your data with timestamps on the arduino and send them afterwards
- get up to 5 float values and send them at ones, you have to rearrange them with phyphox before visualization


Dominik


Attached Files
.phyphox   pressure_plot_Dominik.phyphox (Size: 2.5 KB / Downloads: 506)
Reply


Messages In This Thread
RE: Device for experimental physics teachers - by Dominik Dorsel - 09-07-2020, 10:26 AM

Forum Jump: