Using Accelerometer on MangOH Red


We are trying to use the Accelerometer on the MangOH Red and are wondering about the sensor data output and format that MangOH Red can provide.

If someone has experience using this sensor on MangoOh Red, can you please provide some insights (and documentation) that lays out the sensor parameters that the Accelerometer (such as X,Y, Z axis displacement etc?) can provide and data format there of (floating point, or other).

Appreciate the help.


You can see the RedSensorToCloud app for an example on accelerometer usage. It reports x, y, z readings in m/s2.


Thanks ktanikel.

We are able to see the raw X, Y, Z accelerometer reading now. However, we are not sure what’s the sampling rate used by the accelerometer chip to sample these values.

Is there an API or an alternate mechanism to know/change the sampling frequency. I understand the chip support 1600Hz sampling frequency but not sure how to set it up.

Any help wold be appreciated.


The bmi160 driver hooks into the iio subsystem of Linux and provides a more advanced way of reading the data than just reading one sample from one channel at a time. Exploring that interface some more is on my to-do list.


@Bobby as @dfrey said we are investigating this feature. we think this feature is doable and will provide this integration in Q4.


Thanks @dfrey and @asyal, for your feedback.

Ashish - I sent you an email this morning. Kindly review and let us know how do we move forward with the testing please.



Hi @dfrey, by a ‘more advanced way’ are you talking about setting up iio triggered buffers so that the application can process a chunk of data at a time? I have an accelerometer based application in which I’m polling the sysfs entries for samples - however this is obviously very expensive to do in user space. I’m looking for alternate ways to achieve this and wondering if you’ve made any way headway or if there’s an ETA. Thanks!


I have made progress on this. There is a branch of the mangOH repository named bmi160_fifo which contains my progress. There are still some to-do items, but it’s working at 100hz. Take a look at samples/bufferedImuRead in the mangOH repository for a sample app.

This does depend on kernel changes that I haven’t published yet. But at least you can take a look.