![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Code to drive Team 1's robot for the 2016 R5 robotics competition.
Dependencies: mbed navigation R5_StepperDrive LongRangeSensor DistanceSensor scanner Gripper ColorSensor
r5driver.cpp@3:72b652325643, 2015-10-16 (annotated)
- Committer:
- j_j205
- Date:
- Fri Oct 16 20:06:33 2015 +0000
- Revision:
- 3:72b652325643
- Parent:
- 2:3b162e764c9d
- Child:
- 7:056f78006270
jj 10-16-15
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
j_j205 | 1:1958e6db41fc | 1 | #include "weighted_graph.h" |
j_j205 | 2:3b162e764c9d | 2 | #include "mbed.h" |
j_j205 | 0:a3c39d3359ac | 3 | |
j_j205 | 0:a3c39d3359ac | 4 | Serial pc(USBTX, USBRX); |
j_j205 | 0:a3c39d3359ac | 5 | |
j_j205 | 0:a3c39d3359ac | 6 | int main() |
j_j205 | 0:a3c39d3359ac | 7 | { |
j_j205 | 0:a3c39d3359ac | 8 | pc.baud(115200); |
j_j205 | 0:a3c39d3359ac | 9 | |
j_j205 | 2:3b162e764c9d | 10 | WeightedGraph testMap(6); |
j_j205 | 1:1958e6db41fc | 11 | pc.printf("testMap created\n\n"); |
j_j205 | 1:1958e6db41fc | 12 | |
j_j205 | 1:1958e6db41fc | 13 | int result; |
j_j205 | 2:3b162e764c9d | 14 | result = testMap.loadMap("testmap.txt"); |
j_j205 | 1:1958e6db41fc | 15 | |
j_j205 | 1:1958e6db41fc | 16 | if (result == 1) |
j_j205 | 2:3b162e764c9d | 17 | pc.printf("testmap.txt did not open properly\n\n"); |
j_j205 | 1:1958e6db41fc | 18 | |
j_j205 | 1:1958e6db41fc | 19 | else |
j_j205 | 2:3b162e764c9d | 20 | pc.printf("testmap.txt loaded sucessfully\n\n"); |
j_j205 | 1:1958e6db41fc | 21 | |
j_j205 | 1:1958e6db41fc | 22 | |
j_j205 | 1:1958e6db41fc | 23 | |
j_j205 | 1:1958e6db41fc | 24 | pc.printf("testMap has %i vertices\n", testMap.getVerts() ); |
j_j205 | 0:a3c39d3359ac | 25 | |
j_j205 | 0:a3c39d3359ac | 26 | return 0; |
j_j205 | 1:1958e6db41fc | 27 | } |