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
Diff: main.cpp
- Revision:
- 3:1dce1ba5b8bd
- Parent:
- 1:9feec6f69f72
- Child:
- 5:77c6821ae418
--- a/main.cpp Fri Apr 12 20:15:54 2019 +0000 +++ b/main.cpp Fri Apr 12 23:23:18 2019 +0000 @@ -1,10 +1,21 @@ #include "mbed.h" +#include "DataDistributor.h" +#include "RobotController.h" #include "Motor.h" #include "HALLFX_ENCODER.h" #include "LSM9DS1.h" -Serial pc(USBTX, USBRX); +extern Serial pc(USBTX, USBRX); int main() { - // Test comment + DataDistributor dataDistributor(); + RobotController robotController(); + + while(1) { + float* obstacles = robotController.obstacleDetection(); + dataDistributor.sendObstacles(obstacles); + float* trajectory = dataDistributor.receiveTrajectory(); + robotController.followTrajectory(trajectory); + robotController.toOrigin(trajectory); + } } \ No newline at end of file