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: mbed
Fork of Seeed_Grove_Collision_Sensor_Example by
Revision 1:ad4f4815bcde, committed 2014-09-03
- Comitter:
- mbedAustin
- Date:
- Wed Sep 03 20:24:14 2014 +0000
- Parent:
- 0:3ef14b050782
- Commit message:
- cleaned up unnecessary variable
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 3ef14b050782 -r ad4f4815bcde main.cpp
--- a/main.cpp Wed Sep 03 19:09:25 2014 +0000
+++ b/main.cpp Wed Sep 03 20:24:14 2014 +0000
@@ -5,17 +5,10 @@
int main()
{
- bool value1;
-
- while(1){
- value1 = sig1;
-
- if(sig1 == 0)
- {
+ while(1) {
+ if(sig1 == 0) {
printf("Collision detected!\n\r");
wait(1); // 1 second delay
}
-
}
-
}

Grove Collision Sensor