Ian Shelton / Mbed 2 deprecated lab9

Dependencies:   mbed TTU_CSC1300

Files at this revision

API Documentation at this revision

Comitter:
iashelton
Date:
Wed Apr 21 04:34:08 2021 +0000
Commit message:
Final lab 9;

Changed in this revision

TTU_CSC1300.lib Show annotated file Show diff for this revision Revisions of this file
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/TTU_CSC1300.lib	Wed Apr 21 04:34:08 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/jwbruce/code/TTU_CSC1300/#7bb32dea705b
--- /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);
+        
+
+        
+        
+    }
+}
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 21 04:34:08 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file