I'm trying to read out the accelerator values using STEVAL-STLKT01V1, on iOS. Is there any possibility to set the sample rate of the sensor?
What FW and application on iOS are you using?
When I connect to the sensor using ST App the sensor is found as BM2V220. I do not see any other possibility to read out the FW version. I've got sensors from my customer for whom I should write an iOS app so I do not know other details about the sensor HW. I'm trying to create iOS app using BlueSTSDK_iOS.
The BM2V220 is shortcut for BLUEMICROSYSTEM2 software.
It is obsolete and it has been replace d by FP-SNS-ALLMEMS1.
But unfortunately none of these FW allow to set the sample rate of the sensor. You would have to modify the FW and implement a command for it.
Ok, so do I get it right that the sample rate will be automatically defined by the maximum possible hardware rate ?
The sample rate is hard coded in the FW and for accelerometer it is set to 104Hz.
The FW which you are using is lets say demo, and it doesn't require any modification of the sample rate.
Hi, I have finally attached the sensor. Could you pls. explain the following results:
First number is the "receiving timestamp" on iOS App, second is the Node Timestamp, third the value (Accelerator Z).
I assume the node timestamp is also in Miliseconds (right?). You said sample rate is 104Hz -> 1/104 is about 9 ms which is right.
But the the received timestamp gives interval between events like 30 ... 60 ms and this is the official system source for miliseconds. But then both do not match! Could it be that the Node timestamp is in 10th if miliseconds? Then the timestamps would match but we will get the sample rate of about 60 ms!
New data: 1519755367130 30405 942.0
New data: 1519755367160 30411 1006.0
New data: 1519755367219 30418 1007.0
New data: 1519755367280 30424 798.0
New data: 1519755367309 30430 951.0
New data: 1519755367370 30436 998.0
You have to distinguish several things:
- sensor ODR (output data rate) how often the sensor measure the data
- data reading frequency, how often the microcontroller reads data from the accelerometer
- bluetooth characteristics update rate
Each value can be different.
I would recommend you to update the FW in SensorTile to ALLMEMS1 and study the FW, you should be able to find all these information in the source code.
Ok, in that case the 104 Hz you were mentioning earlier refers to which thing - ODR or Data Reading frequency?
Also could you pls point me to the Sources of ALLMEMS1 as well as FW update instructions?
The 104Hz mentioned earlier refers to sensor ODR.
Here is the link to ALLMEMS1 firmware.
FP-SNS-ALLMEMS1 - STM32 ODE function pack for IoT node with BLE connectivity, digital microphone, environmental and moti…
For your information the data reading frequency in this fw is 20Hz and the timestamp is in multiple of 8ms.
Retrieving data ...