Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed TTU_CSC1300
Revision 0:7913048819b0, committed 2021-04-21
- Comitter:
- iashelton
- Date:
- Wed Apr 21 04:34:08 2021 +0000
- Commit message:
- Final lab 9;
Changed in this revision
--- /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