Button example.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
eencae
Date:
Fri Mar 02 16:21:28 2018 +0000
Parent:
4:1676578fd4cd
Commit message:
Added missing bracket

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1676578fd4cd -r 0143ac4615a0 main.cpp
--- a/main.cpp	Fri Mar 02 13:40:23 2018 +0000
+++ b/main.cpp	Fri Mar 02 16:21:28 2018 +0000
@@ -28,14 +28,15 @@
         } else if ( button_C.read() == 1) { // check if C pressed
             blue_led.write(0);  // if it is, turn the blue LED on
         } else {
-            // if no buttons pressed, ensure all the LEDs are off 
+            // if no buttons pressed, ensure all the LEDs are off
             red_led.write(1);
             green_led.write(1);
             blue_led.write(1);
         }
-        
-    wait(0.1);  // small delay
 
+        wait(0.1);  // small delay
+
+    }
 }
 
 void init_buttons()