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
main.cpp
- Committer:
- iashelton
- Date:
- 2021-04-21
- Revision:
- 0:7913048819b0
File content as of revision 0:7913048819b0:
/* * 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); } }