a

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Dom952
Date:
Sat Apr 23 17:39:54 2016 +0000
Commit message:
a

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 3bd4118e5c71 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Apr 23 17:39:54 2016 +0000
@@ -0,0 +1,55 @@
+#include "mbed.h"
+
+DigitalIn enable(USER_BUTTON);
+DigitalOut led_1(LED1);
+DigitalOut led_2(LED2);
+
+int main() {
+    while(1) {
+        if(enable) {
+            led_1 = !led_1;
+        }
+        else {
+            led_2 = !led_2;
+        }
+        wait(0.1);
+    }
+}
+
+/*
+DigitalOut led_green(LED1);
+DigitalOut led_red(LED2);
+
+InterruptIn user_button(USER_BUTTON);
+
+float delay_on = 0.2;
+float delay_off = 1.0;
+
+void button_pressed()
+{
+    delay_on = 0.1;
+    delay_off = 0.1;
+}
+
+void button_released()
+{
+    delay_on = 0.2;
+    delay_off = 1.0;
+}
+
+int main()
+{
+    user_button.rise(&button_pressed);
+    user_button.fall(&button_released);
+    
+    while(1) {
+        // LEDs are ON
+        led_green = 1;
+        led_red = 1;
+        wait(delay_on);
+        // LEDs are OFF
+        led_green = 0;
+        led_red = 0;
+        wait(delay_off);
+    }
+}*/
diff -r 000000000000 -r 3bd4118e5c71 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Apr 23 17:39:54 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file