Lambert kavamahanga / Mbed 2 deprecated Swictc_led

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lambert2021
Date:
Thu May 27 13:57:49 2021 +0000
Commit message:
Connecting Switchbotton and led

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 27 13:57:49 2021 +0000
@@ -0,0 +1,11 @@
+#include "mbed.h"
+
+DigitalIn switchbutton(p5);
+DigitalOut led(LED1);
+
+int main() {
+    while (1) { 
+       led=switchbutton;
+        wait_ms(500);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 27 13:57:49 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file