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.
Fork of LineFollower by
Diff: LineFollower.cpp
- Revision:
- 6:3482f3f93988
- Parent:
- 5:1c4c12596ad2
- Child:
- 7:de9902f316aa
diff -r 1c4c12596ad2 -r 3482f3f93988 LineFollower.cpp
--- a/LineFollower.cpp Thu Mar 06 02:21:23 2014 +0000
+++ b/LineFollower.cpp Thu Mar 06 02:34:37 2014 +0000
@@ -33,7 +33,7 @@
* @param l left drive motor
* @param r right drive motor
*/
- void LineFollower::followLine(Motor l, Motor r){
+ int LineFollower::followLine(Motor l, Motor r){
int count = 0;
for(int i = 0; i<8; i++){
count += (array&(1<<0))?0:1;
@@ -107,5 +107,7 @@
}
break;
default: break;
+
}
+ return count;
}
\ No newline at end of file
