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.
Diff: main.cpp
- Revision:
- 2:d22dcc2bfcc1
- Parent:
- 1:47ea51d9e25d
- Child:
- 3:47968be0df37
--- a/main.cpp Wed Nov 21 11:42:39 2018 +0000 +++ b/main.cpp Wed Nov 21 11:48:42 2018 +0000 @@ -27,14 +27,7 @@ } int main() { - //Marc's sensor test - m3pi.cls(); - sensor_value0 = sensor_all(0); // sensor_value gets fkt value - sensor_value4 = sensor_all(4); // sensor_value gets fkt value - m3pi.locate(0,0); - m3pi.printf("%d", sensor_value0); // prints one of sidesensors value - m3pi.locate(0,1); - m3pi.printf("%d", sensor_value4); // prints the other sidesensor value + m3pi.locate(0,1); m3pi.printf("Line PID"); @@ -90,6 +83,14 @@ m3pi.left_motor(left); m3pi.right_motor(right); + //Marc's sensor test + m3pi.cls(); + sensor_value0 = sensor_all(0); // sensor_value gets fkt value + sensor_value4 = sensor_all(4); // sensor_value gets fkt value + m3pi.locate(0,0); + m3pi.printf("%d", sensor_value0); // prints one of sidesensors value + m3pi.locate(0,1); + m3pi.printf("%d", sensor_value4); // prints the other sidesensor value }