Example code

Dependencies:   mbed

Revision:
0:0ee4748f4c5c
Child:
1:ce08f1d8140c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 07 06:52:15 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+//------------------------------------------------------------------------------
+// Before using this example, ensure that you an hyperterminal installed on your
+// computer. More info here: https://developer.mbed.org/handbook/Terminals
+//
+// Hyperterminal default configuration:
+// 9600 bauds, 8-bit data, no parity
+//------------------------------------------------------------------------------
+
+DigitalOut led(LED1);
+
+int main()
+{
+    int i = 1;
+
+    printf("Hello World !\n");
+
+    while(1) {
+        wait(1); // 1 second
+        led = !led; // Toggle LED
+        printf("This program runs since %d seconds.\n", i++);
+    }
+}