Thinxtra / Xkit-Sample

Sample Code for the Xkit. The perfect way to get started with Sigfox, the Thinxtra devkit Xkit boasts a full suite of features and accessories to empower anyone to set up an IoT solution, even with very little hardware experience. Perfect for start-ups, design houses, universities and schools, the kit has everything you need to hit the ground running using the globally available Sigfox network.
23 stars 21 forks source link

How do I attach an interrupt to Accelerometer? #7

Open nuwanprabhath opened 5 years ago

nuwanprabhath commented 5 years ago

Sensor included in Xkit MMA8451Q has a feature to attach an interrupt so that host processor does not need to poll the sensor values to increase the battery life. Please refer features in the datasheet. How do I use Tsensors library to do that? My requirement is to get notified when the acceleration exceeds a given threshold in any direction (x, y, z).

And how do I change the range of accelerometer range to +/- 8g?

nuwanprabhath commented 5 years ago

I've found that changing values passed to XYZ_DATA_CFG register (Changing FS1 and FS0 bits) will change the range but what about the interrupts?