![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
code for the speed robot
Dependencies: MPU6050-DMP mbed PololuQTRSensors vl53l0x
_def.h@3:9b2f15b0d47b, 2019-09-30 (annotated)
- Committer:
- deepanaishtaweera174
- Date:
- Mon Sep 30 10:19:31 2019 +0000
- Revision:
- 3:9b2f15b0d47b
- Parent:
- 1:b188e27eb7da
- Child:
- 6:a635edf31d8b
added tof code for 3 sensors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
deepanaishtaweera174 | 0:c3a27228c31b | 1 | #include "I2Cdev.h" |
deepanaishtaweera174 | 0:c3a27228c31b | 2 | #include "MPU6050_6Axis_MotionApps20.h" |
deepanaishtaweera174 | 1:b188e27eb7da | 3 | #include "VL53L0X.h" |
deepanaishtaweera174 | 0:c3a27228c31b | 4 | |
deepanaishtaweera174 | 0:c3a27228c31b | 5 | #ifndef M_PI |
deepanaishtaweera174 | 0:c3a27228c31b | 6 | #define M_PI 3.1415 |
deepanaishtaweera174 | 0:c3a27228c31b | 7 | #endif |
deepanaishtaweera174 | 0:c3a27228c31b | 8 | |
deepanaishtaweera174 | 3:9b2f15b0d47b | 9 | #define Sensor1_newAddress 42 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 10 | #define Sensor2_newAddress 43 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 11 | #define Sensor3_newAddress 44 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 12 | |
deepanaishtaweera174 | 3:9b2f15b0d47b | 13 | #define SignalRateLimit 0.9 //Higher the limit , higher the accuracy //0.8 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 14 | #define MeasurementBudget 40000 //Higher the time , higher the accuracy //20000 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 15 | #define Timeout 500 //200 |
deepanaishtaweera174 | 3:9b2f15b0d47b | 16 | #define ContInterval 40 //inter-measurement period in milliseconds determining how often the sensor takes a measurement. |
deepanaishtaweera174 | 3:9b2f15b0d47b | 17 | |
deepanaishtaweera174 | 0:c3a27228c31b | 18 | void PrintSerial(string message){ |
deepanaishtaweera174 | 0:c3a27228c31b | 19 | printf("%s\n",message); |
deepanaishtaweera174 | 0:c3a27228c31b | 20 | } |
deepanaishtaweera174 | 0:c3a27228c31b | 21 |