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:
- 7:7d491b51665e
- Parent:
- 6:99d09e88924b
- Child:
- 8:bd2f012e2f57
--- a/main.cpp Wed May 27 12:02:28 2015 +0000
+++ b/main.cpp Wed May 27 13:36:42 2015 +0000
@@ -39,7 +39,7 @@
float average_time = 0.0;
int y =1;
int count = 0;
- int paramChange[3];
+ float paramChange[3];
char arr_read[30]; // this should be long enough to store any reply coming in over bt.
int chars_read;
@@ -72,7 +72,7 @@
//else if (m3pi_IN [0] == 0)
//{break;}
- else if( x[0] > 300 && x[2]>300 && x[4]>300) {
+ if( x[0] > 300 && x[2]>300 && x[4]>300) {
if (lap == 0) {
while( x[0]> 300 && x[4] > 300) {
robot.calibrated_sensor(x);
@@ -95,7 +95,7 @@
while (count < 3){
//btbee.printf("Input parameter\n");
btbee.read_line(arr_read, 30, &chars_read);
- paramChange[count] = atoi(arr_read);
+ paramChange[count] = atof(arr_read);
//btbee.printf("%d", arr_read);
count++;
}