Nucleo_DigitalInput

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
anoney180133
Date:
Fri Dec 11 14:20:57 2015 +0000
Commit message:
dc

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r e66a2abcf59d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 11 14:20:57 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+DigitalOut Nucleo_GREEN_LED(LED1);
+DigitalIn  Push_Button(PC_13,PullNone);
+
+int main() 
+{
+    while(1) 
+    {
+        if(Push_Button.read() == 0) // pressed button
+        {
+            Nucleo_GREEN_LED = 1; // LED is ON
+        }
+        else
+        {
+            Nucleo_GREEN_LED = 0; // LED is OFF
+        }
+    }
+}
diff -r 000000000000 -r e66a2abcf59d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 11 14:20:57 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file