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:
Fri Oct 16 18:59:33 2015 +0000
Revision:
2:3b162e764c9d
Parent:
1:1958e6db41fc
Child:
3:72b652325643
jj 10-16-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 "weighted_graph.h"
j_j205 2:3b162e764c9d 3 #include "mbed.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 2:3b162e764c9d 11 WeightedGraph testMap(6);
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 2:3b162e764c9d 15 result = testMap.loadMap("testmap.txt");
j_j205 1:1958e6db41fc 16
j_j205 1:1958e6db41fc 17 if (result == 1)
j_j205 2:3b162e764c9d 18 pc.printf("testmap.txt did not open properly\n\n");
j_j205 1:1958e6db41fc 19
j_j205 1:1958e6db41fc 20 else
j_j205 2:3b162e764c9d 21 pc.printf("testmap.txt 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 }