Inaccurate sampling rate on barometer MetawearC
I am using the Mbientant lab METAWEARC board and the MetaWear-SampleApp-Android mobile application. The barometer sample freq in the code is set to 26.32 Hz (as per GitHub repository code).
However, when I carry out a three minute recording instead of the final time stamp being around 180s it is around 164s. The number of samples is 3848 instead of the expected value around 4738.
I repeated this test at 10Hz and 50Hz and the final timestamp was 386.7s and 78.44s respectively when both should have been 180s. The number of samples are 3869 and 3964 for 10Hz and 50Hz instead of expected value around 1800 and 9000.
The 'real' frequency seems to be permanently set at around 21.4Hz. When I did a recording at 21.4Hz the final timestamp and number of samples was as expected. For my application I would like to set the frequency to 10Hz or 50Hz. Any ideas or suggestions to how we can change the frequency?