Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos MotionSensor EthernetInterface
Diff: SensorsLibrary/FXAS21002.h
- Revision:
- 9:bd0fb9d17803
- Parent:
- 0:88faaa1afb83
- Child:
- 12:273752f540be
--- a/SensorsLibrary/FXAS21002.h Mon Apr 11 05:51:34 2016 +0000 +++ b/SensorsLibrary/FXAS21002.h Sat Apr 30 12:57:17 2016 -0300 @@ -28,6 +28,21 @@ #define FXAS21002_CTRL_REG1 0x13 #define FXAS21002_WHO_AM_I_VALUE 0xD1 +/* Gyroscope mechanical modes +* Mode Full-scale range [Deg/s] Sensitivity [(mDeg/s)/LSB] +* 1 +- 2000 62.5 +* 2 +- 1000 31.25 +* 3 +- 500 15.625 +* 4 +- 250 7.8125 +*/ +enum gyro_mode +{ + MODE_1 = 0x00, + MODE_2 = 0x01, + MODE_3 = 0x02, + MODE_4 = 0x03 +} + class FXAS21002 { public: @@ -35,12 +50,13 @@ FXAS21002(PinName sda, PinName scl); void gyro_config(void); + void gyro_config(gyro_mode mode); void acquire_gyro_data_dps(float * du); private: I2C gyroi2c; - + float sensivity; }; #endif \ No newline at end of file