Set reading frequency of imu sensors of arduino 101

Good morning,
i'm a newbie of arduino, and i'm using it for my university project.
I have a question:
is there a way to set the reading frequency of imu sensors?
Because in my project (you can see it here LINK) i'm sending the imu data (acceleration and gyroscope) of the arduino 101 to pc using BLE (on macbook air i run a node.js server with socket and i show them on a localhost webpage), but i have seen that the speed of update is very different from the ratio that can i by serial monitor connected by usb.
So, my doubt is that maybe i'm trying to read from the sensor with a speed faster than the sensor can do and for this reason i'm asking if i can control it.
Do you know also if there is a way to control the bluetooth speed?
Thanks

For arduino101, this is a arduino compatible Intel powered device.

As far as I know, the BLE is integrated from Nordic 51822. The speed for Bluetooth can be controlled by MAX_CONN_INTERVAL.

As you know, when you call the BLE data sending API, it just put it into the sending buffer. With the parameter above,it sends the packet periodically. I think you can find the param in the example skeches.

Actually I am building a more powerful program with arduino 101 BLE. You can check my source code from here. I am glad to fix any of your BLE problem if I can

Check

Thank you so much wikit!
I'll take a look of your code.

And about the frequency of imu readings, do you know also if you can control it?

Hi
yes this is possible
Take a look at the below link.
The 101 imu is the same as mp6050.
It just put the package inside the chip.

Thanks. But, do you know which is the maximum update frequency that i can send by BLE? Because i'm reading data from imu and sending the to pc via bluetooth but the connection is so slower respect to usb; is the same for you, or is it a problem of my macbook air(where apple decided to limit the BLE)?

The maximim frequency should be 7.5ms for 6 packets with 20 bytes in maximum each.

Thus you could see your data throughput with BLE will be

6 * 20 * 1000/7.5 = 16kb/s

wikit:
The maximim frequency should be 7.5ms for 6 packets with 20 bytes in maximum each.

Thus you could see your data throughput with BLE will be

6 * 20 * 1000/7.5 = 16kb/s

Hi wikit, I have been trying to do that. Sending at least 2 packets every 10ms. But the intel curie's Tiny Tile gets frozen.

This is my issue and code,

It would be of great help if you could point out my mistake.
or any sample code which send atleast 2 packets every 10ms or 4 packets every 20ms.
I could only achieve 2 packets every 25ms.

Thank you
Tim