Ian Shelton / Mbed 2 deprecated lab9

Dependencies:   mbed TTU_CSC1300

Revision:
0:7913048819b0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 21 04:34:08 2021 +0000
@@ -0,0 +1,47 @@
+/*
+ *     Lab #:9
+ * Lab Title:loops
+ * Author(s):Ian Shelton
+ *      Date: 04/20/21
+ *   Purpose: counts in bianary to 7 then loops
+ */
+ 
+#include "mbed.h"
+#include "TTU_CSC1300.h"
+ 
+//FUNCTION PROTOTYPES GO HERE
+BusOut all_leds(LED0_PIN, LED1_PIN, LED2_PIN); //can write to all LEDs at once, 0-7 represents combination of on LEDs
+TextLCD lcd(TextLCD::LCD_CURSOR_ON_BLINKING_ON);
+ 
+int main()
+{
+    int i(0);
+    //this while(TRUE) loop keeps the program running
+    while(TRUE)
+    {
+        //WRITE SOLUTION HERE
+        while(sw5!=1)
+        {
+            i++;
+            all_leds=i;
+            if(i==7)
+            {
+             i=0;   
+            }
+            wait_ms(1000);
+        }
+            led1=TRUE;
+            led0=TRUE;
+            led2=TRUE;
+            wait_ms(1000);
+            led1=FALSE;
+            led0=FALSE;
+            led2=FALSE;
+            wait_ms(1000);
+        
+
+        
+        
+    }
+}
+