fork
Revision 7:1f92801f7b0f, committed 2018-12-01
- Comitter:
- Stas285
- Date:
- Sat Dec 01 14:20:24 2018 +0000
- Parent:
- 6:b4f5edf825be
- Commit message:
- Coord_ready
Changed in this revision
MPU6050.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b4f5edf825be -r 1f92801f7b0f MPU6050.cpp --- a/MPU6050.cpp Sun Nov 18 10:24:23 2018 +0000 +++ b/MPU6050.cpp Sat Dec 01 14:20:24 2018 +0000 @@ -14,7 +14,7 @@ write_reg(ADDRESS,MPU6050_PWR_MGMT_1,0x00); write_reg(ADDRESS,MPU6050_GYRO_CONFIG,0x00);//gyro +-500deg/s //0x10);//gyro +-1000deg/s write_reg(ADDRESS,MPU6050_ACCEL_CONFIG,0x00);//accel +-2G //0x08);//accel +-4G - write_reg(ADDRESS,MPU6050_CONFIG,0x06);//2 - bandwidth 94Hz, delay 3 mS; 3 - bandwidth 44Hz, delay 5 mS; 4 - bandwidth 21Hz, delay 8.5 mS; 5 - bandwidth 10Hz, delay 14 mS + write_reg(ADDRESS,MPU6050_CONFIG,0x06);//2 - bandwidth 94Hz, delay 3 mS; 3 - bandwidth 44Hz, delay 5 mS; 4 - bandwidth 21Hz, delay 8.5 mS; 5 - bandwidth 10Hz, delay 14 mS; 5 - bandwidth 5Hz, delay 19 mS write_reg(ADDRESS,MPU6050_SMPLRT_DIV,0x0);//sample rate 1000Hz (1000/5) }