Seeedstudio Arch Examples : GPIO - Blinking LED implemented with alternate DigitalOut functions.

Dependencies:   mbed

Fork of Arch_GPIO_Ex1 by Visweswara R

Files at this revision

API Documentation at this revision

Comitter:
viswesr
Date:
Thu Sep 05 02:19:37 2013 +0000
Child:
1:3c5f838ae76d
Commit message:
First version

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 Sep 05 02:19:37 2013 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+/* Configure a GPIO pin as output for controlling a LED. 'led' is user assigned name and
+ 'LED1' is a internal name given to a port pin P1_8 in this Arch platform. */
+DigitalOut led(LED1);
+
+int main()
+{
+    while(1) {
+        led = 1;    // Switch ON the LED.
+        wait(0.5);  // Wait for 0.5 Seconds.
+        led = 0;    // Switch OFF the LED.
+        wait(0.5);  // Wait for 0.5 Seconds.
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 05 02:19:37 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb
\ No newline at end of file