Example of an "extern" declaration to reuse a global variable defined in one file in another file.

Dependencies:   mbed

Revision:
0:bc708d703171
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 23 20:45:28 2015 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+#include "myWait.h"
+DigitalOut redLed(LED_RED);
+DigitalOut greenLed(LED_GREEN);
+
+int main() {
+    while(1) {
+        redLed = 1;
+        myWait(0.2);
+        redLed = 0;
+        myWait(0.2);
+    }
+}