MPU9250

Dependents:   FreeIMU

Fork of MPU6050 by Yifei Teng

Revision:
11:9549be34fa7f
Parent:
9:d879deb55ae1
Child:
12:e32a6beb0a41
--- a/MPU6050.h	Mon Dec 23 08:34:58 2013 +0000
+++ b/MPU6050.h	Wed Sep 24 01:10:42 2014 +0000
@@ -406,6 +406,8 @@
     private:
         I2Cdev i2Cdev;
         Serial debugSerial;
+        bool sampling;  // flag to indicate whether sampling ticker is running
+        
     public:
         MPU6050();
         MPU6050(MODI2C i2c);
@@ -430,7 +432,9 @@
         // SMPLRT_DIV register
         uint8_t getRate();
         void setRate(uint8_t rate);
-        
+
+        // turn sampling on or off
+        void sample(bool sampling);
 
         // CONFIG register
         uint8_t getExternalFrameSync();