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: btbee m3pi_ng mbed FatFileSystem MSCFileSystem
Diff: main.cpp
- Revision:
- 13:9bb4ac4968d2
- Parent:
- 12:0422156f83f6
- Child:
- 14:5b3cc7741bdf
diff -r 0422156f83f6 -r 9bb4ac4968d2 main.cpp
--- a/main.cpp Mon Jun 01 08:06:02 2015 +0000
+++ b/main.cpp Mon Jun 01 08:10:10 2015 +0000
@@ -207,19 +207,17 @@
current_pos = robot.line_position();
- /*if (fgets(sweepValue, 100, sweep) != NULL){
- if (import < sweepData.size())*/
- f = 19.8/20 * t + .2;
- newSetPoint = A*sin(2*PI*f*t);
- proportional = newSetPoint + current_pos;
+ if (fgets(sweepValue, 100, sweep) != NULL){
+
+ //f = 19.8/20 * t + .2;
+ //newSetPoint = A*sin(2*PI*f*t);
+ proportional = atof(sweepValue) + current_pos;
- /*else
- break;*/
- /*}
+ }
else{
robot.printf("Try Again");
break;
- }*/
+ }
derivative = current_pos - previous_pos;