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 mbed-rtos Motor LSM9DS1_Library_cal X_NUCLEO_53L0A1
main.cpp@11:531208aca075, 2019-04-23 (annotated)
- Committer:
- rpatelpj
- Date:
- Tue Apr 23 19:56:39 2019 +0000
- Revision:
- 11:531208aca075
- Parent:
- 8:bfa4bf23522c
- Child:
- 12:946f56f78d2b
Remove HALLFX_ENCODER lib, create and implement Encoder class, include Imu lib, implement RobotController angular position tracking and destructor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
abh15 | 6:c119cc5d48d6 | 1 | #include "globals.h" |
rpatelpj | 3:1dce1ba5b8bd | 2 | #include "DataDistributor.h" |
rpatelpj | 3:1dce1ba5b8bd | 3 | #include "RobotController.h" |
rpatelpj | 0:66b7ea9af0dc | 4 | |
abh15 | 6:c119cc5d48d6 | 5 | Serial pc(USBTX, USBRX); |
rpatelpj | 8:bfa4bf23522c | 6 | BusOut led(LED1, LED2, LED3, LED4); |
rpatelpj | 8:bfa4bf23522c | 7 | DigitalIn pb(p23); |
rpatelpj | 8:bfa4bf23522c | 8 | |
rpatelpj | 8:bfa4bf23522c | 9 | float* obstacles = new float[360]; |
rpatelpj | 8:bfa4bf23522c | 10 | int trajectoryLength = 0; |
rpatelpj | 8:bfa4bf23522c | 11 | float* trajectory = new float[0]; |
rpatelpj | 0:66b7ea9af0dc | 12 | |
rpatelpj | 0:66b7ea9af0dc | 13 | int main() { |
rpatelpj | 8:bfa4bf23522c | 14 | delete []trajectory; |
rpatelpj | 5:77c6821ae418 | 15 | DataDistributor dataDistributor; |
rpatelpj | 11:531208aca075 | 16 | RobotController robotController(p21, p15, p16, p22, p18, p19, p13, p14, p9, p10); |
rpatelpj | 3:1dce1ba5b8bd | 17 | |
rpatelpj | 3:1dce1ba5b8bd | 18 | while(1) { |
rpatelpj | 8:bfa4bf23522c | 19 | robotController.detectObstacles(); |
rpatelpj | 8:bfa4bf23522c | 20 | dataDistributor.transmitObstacles(); |
rpatelpj | 8:bfa4bf23522c | 21 | dataDistributor.receiveTrajectory(); |
rpatelpj | 8:bfa4bf23522c | 22 | robotController.followTrajectory(); |
rpatelpj | 3:1dce1ba5b8bd | 23 | } |
rpatelpj | 0:66b7ea9af0dc | 24 | } |