
Filter for 9250
Fork of MPU9250 by
Diff: main.cpp
- Revision:
- 1:3cf2930938a8
- Parent:
- 0:ccea261dce7a
- Child:
- 2:6b427a493d9b
--- a/main.cpp Fri May 06 12:40:21 2016 +0000 +++ b/main.cpp Sat Jun 10 23:47:23 2017 +0000 @@ -25,7 +25,10 @@ We have disabled the internal pull-ups used by the Wire library in the Wire.h/twi.c utility file. We are also using the 400 kHz fast I2C mode by setting the TWI_FREQ to 400000L /twi.h utility file. */ - + //yellow on PB9 + //Green on PB8 + //brown 3,3V + //black GND #include "mbed.h" #include "MPU9250.h" @@ -43,9 +46,14 @@ int main() { pc.baud(9600); - + + // while(1) + //{ + wait(.5); + + //} //Set up I2C - i2c.frequency(400000); // use fast (400 kHz) I2C + i2c.frequency(1000000); // use fast (400 kHz) I2C pc.printf("CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock); @@ -147,7 +155,7 @@ // Serial print and/or display at 0.5 s rate independent of data rates delt_t = t.read_ms() - count; - if (delt_t > 500) { // update LCD once per half-second independent of read rate + if (delt_t > 1000) { // update LCD once per half-second independent of read rate pc.printf("ax = %f", 1000*ax); pc.printf(" ay = %f", 1000*ay);