Code fonctionnel switch

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Souleymane93
Date:
Tue Mar 07 12:29:56 2017 +0000
Commit message:
Code pour le switch fonctionnel

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 3e61877b8e11 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 07 12:29:56 2017 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+DigitalIn din(D3);
+DigitalOut led(LED1);
+int main() {
+    while(1) {
+        if(din) {
+            led = 0;//Allume
+        }
+        else{
+            led = 1;//Eteint    
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 3e61877b8e11 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 07 12:29:56 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/ef9c61f8c49f
\ No newline at end of file