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 AQM1602 HMC6352 PID
config.h@13:f8f5bd2f0525, 2015-11-20 (annotated)
- Committer:
- lilac0112_1
- Date:
- Fri Nov 20 07:45:06 2015 +0000
- Revision:
- 13:f8f5bd2f0525
add mpu6050;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| lilac0112_1 | 13:f8f5bd2f0525 | 1 | #ifndef _CONFIG_H_ |
| lilac0112_1 | 13:f8f5bd2f0525 | 2 | #define _CONFIG_H_ |
| lilac0112_1 | 13:f8f5bd2f0525 | 3 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 4 | // FIFO rate = 200Hz / (1 + this value) |
| lilac0112_1 | 13:f8f5bd2f0525 | 5 | // For example, 0x01 is 100Hz, 0x03 is 50Hz. |
| lilac0112_1 | 13:f8f5bd2f0525 | 6 | // 0x00 to 0x09 |
| lilac0112_1 | 13:f8f5bd2f0525 | 7 | #define IMU_FIFO_RATE_DIVIDER 0x09 |
| lilac0112_1 | 13:f8f5bd2f0525 | 8 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 9 | // Sample rate = 1kHz / (1 + this valye) |
| lilac0112_1 | 13:f8f5bd2f0525 | 10 | // For example, 4 is 200Hz. |
| lilac0112_1 | 13:f8f5bd2f0525 | 11 | #define IMU_SAMPLE_RATE_DIVIDER 4 |
| lilac0112_1 | 13:f8f5bd2f0525 | 12 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 13 | // measuring range of gyroscope (±n deg/s) |
| lilac0112_1 | 13:f8f5bd2f0525 | 14 | // But other value doesn't yet support. |
| lilac0112_1 | 13:f8f5bd2f0525 | 15 | #define MPU6050_GYRO_FS MPU6050_GYRO_FS_2000 |
| lilac0112_1 | 13:f8f5bd2f0525 | 16 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 17 | // measuring range of acceleration sensor (±n g) |
| lilac0112_1 | 13:f8f5bd2f0525 | 18 | // But other value doesn't yet support. |
| lilac0112_1 | 13:f8f5bd2f0525 | 19 | #define MPU6050_ACCEL_FS MPU6050_ACCEL_FS_2 |
| lilac0112_1 | 13:f8f5bd2f0525 | 20 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 21 | #define PC_BAUDRATE 9600//921600 |
| lilac0112_1 | 13:f8f5bd2f0525 | 22 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 23 | // Define Necessary. |
| lilac0112_1 | 13:f8f5bd2f0525 | 24 | //#define OUTPUT_QUATERNION |
| lilac0112_1 | 13:f8f5bd2f0525 | 25 | //#define OUTPUT_EULER |
| lilac0112_1 | 13:f8f5bd2f0525 | 26 | #define OUTPUT_ROLL_PITCH_YAW |
| lilac0112_1 | 13:f8f5bd2f0525 | 27 | //#define OUTPUT_FOR_TEAPOT |
| lilac0112_1 | 13:f8f5bd2f0525 | 28 | //#define OUTPUT_TEMPERATURE |
| lilac0112_1 | 13:f8f5bd2f0525 | 29 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 30 | #define DEG_TO_RAD(x) ( x * 0.01745329 ) |
| lilac0112_1 | 13:f8f5bd2f0525 | 31 | #define RAD_TO_DEG(x) ( x * 57.29578 ) |
| lilac0112_1 | 13:f8f5bd2f0525 | 32 | |
| lilac0112_1 | 13:f8f5bd2f0525 | 33 | #endif /*_CONFIG_H_*/ |