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
Diff: AutoDrive.cpp
- Revision:
- 2:cb6bae534500
- Parent:
- 0:4a0b987c5c94
- Child:
- 5:695c5531f65e
diff -r 056cd61800e9 -r cb6bae534500 AutoDrive.cpp
--- a/AutoDrive.cpp Fri Apr 27 12:33:54 2018 +0000
+++ b/AutoDrive.cpp Fri Apr 27 13:17:39 2018 +0000
@@ -1,6 +1,15 @@
+#include "mbed.h"
+#include "MotorDriver.h"
+#include "ReadFinalLine.h"
+#include "ReadSensor.h"
+#include "Mapping.h"
+#include "AutoDrive.h"
+#include "RouteCalculation.h"
+
int action = 0;
int speed = 3;
- autoDrive(const int route[][]){
+ int placeholder = 1;
+ void AutoDrive(const int route[][2]){
while(route[action][0] != 0){
@@ -10,15 +19,15 @@
break;
case 2: // turn Right
- turnRight();
+ turnRight(placeholder);
break;
case 3: // turn Left
- turnLeft();
+ turnLeft(placeholder);
break;
case 4: // turn right on spot
- trunRight();
+ turnRight(placeholder);
break;
default: printf("Error: route could not be red!");