Task 3.3.2

Dependencies:   mbed

Revision:
0:4473259e507f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 24 12:26:04 2015 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+BusOut binaryOutput(D5, D6, D7);
+//DigitalIn SW1(D4);
+
+int main() {
+
+    unsigned int uiCount = 0;
+
+    while(1) {
+        
+        do {
+            //Write decimal to the output
+            binaryOutput = uiCount;
+            
+            //Increment the count
+            uiCount = uiCount + 1;  
+            wait(1.0);              //Delay for 1s
+
+        //Condition to repeat
+        } while (uiCount < 8);    
+                            
+        //Reset the count
+        uiCount = 0;
+        
+    } //end while(1)
+} //end main