Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:c76222c6370a
- Parent:
- 0:b729782a3ad7
- Child:
- 3:65d6deb7d07b
--- a/main.cpp	Wed Nov 19 19:35:31 2014 +0000
+++ b/main.cpp	Wed Nov 19 19:39:12 2014 +0000
@@ -1,17 +1,12 @@
 #include "mbed.h"
 
-DigitalOut myled1(p18);
-DigitalOut myled2(p20);
+DigitalOut led(LED1); //P0_18 in NRF51822_MKIT
 
 int main() {
     while(1) {
-        myled1 = 1; // LED is ON
-        wait(0.05); // 200 ms
-        myled1 = 0; // LED is OFF
-        wait(0.05); // 1 sec
-        myled2 = 1; // LED is ON
-        wait(0.05); // 200 ms
-        myled2 = 0; // LED is OFF
-        wait(0.05); // 1 sec
+        led = 1; // LED is ON
+        wait(0.05); // 50 ms
+        led = 0; // LED is OFF
+        wait(0.05); // 50 ms
     }
 }
\ No newline at end of file