Code to drive Team 1's robot for the 2016 R5 robotics competition.

Dependencies:   mbed navigation R5_StepperDrive LongRangeSensor DistanceSensor scanner Gripper ColorSensor

Committer:
j_j205
Date:
Thu Oct 15 22:07:56 2015 +0000
Revision:
1:1958e6db41fc
Parent:
0:a3c39d3359ac
Child:
2:3b162e764c9d
JJ 10-15-15

Who changed what in which revision?

UserRevisionLine numberNew contents of line
j_j205 0:a3c39d3359ac 1 #include <cstdio>
j_j205 1:1958e6db41fc 2 #include "navigation.h"
j_j205 1:1958e6db41fc 3 #include "weighted_graph.h"
j_j205 0:a3c39d3359ac 4
j_j205 0:a3c39d3359ac 5 Serial pc(USBTX, USBRX);
j_j205 0:a3c39d3359ac 6
j_j205 0:a3c39d3359ac 7 int main()
j_j205 0:a3c39d3359ac 8 {
j_j205 0:a3c39d3359ac 9 pc.baud(115200);
j_j205 0:a3c39d3359ac 10
j_j205 1:1958e6db41fc 11 WeightedGraph testMap;
j_j205 1:1958e6db41fc 12 pc.printf("testMap created\n\n");
j_j205 1:1958e6db41fc 13
j_j205 1:1958e6db41fc 14 int result;
j_j205 1:1958e6db41fc 15 result = testMap.loadMap("testmap.dat");
j_j205 1:1958e6db41fc 16
j_j205 1:1958e6db41fc 17 if (result == 1)
j_j205 1:1958e6db41fc 18 pc.printf("testmap.dat did not open properly\n\n");
j_j205 1:1958e6db41fc 19
j_j205 1:1958e6db41fc 20 else
j_j205 1:1958e6db41fc 21 pc.printf("testmap.dat loaded sucessfully\n\n");
j_j205 1:1958e6db41fc 22
j_j205 1:1958e6db41fc 23
j_j205 1:1958e6db41fc 24
j_j205 1:1958e6db41fc 25 pc.printf("testMap has %i vertices\n", testMap.getVerts() );
j_j205 0:a3c39d3359ac 26
j_j205 0:a3c39d3359ac 27 return 0;
j_j205 1:1958e6db41fc 28 }