![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
code for the speed robot
Dependencies: MPU6050-DMP mbed PololuQTRSensors vl53l0x
_var.h
- Committer:
- deepanaishtaweera174
- Date:
- 2019-09-30
- Revision:
- 0:c3a27228c31b
- Child:
- 1:b188e27eb7da
File content as of revision 0:c3a27228c31b:
I2C i2c(PB_9,PB_8); // Gyro Variables MPU6050 mpu; volatile bool mpuInterrupt = false; unsigned long savedMillis; bool gyroTurnMode = false; float zAngle = 0; float xAngle = 0; float preZAngle = 0; float preXAngle = 0; float startAngle = 0; unsigned long preGyroMillis = 0; // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; uint8_t fifoBuffer[64]; // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] VectorInt16 aaWorld; // [x, y, z] VectorFloat gravity; // [x, y, z] gravity vector float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll]