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.
main.cpp
- Committer:
- wadesamples
- Date:
- 2021-04-21
- Revision:
- 0:f9065ea26a3d
File content as of revision 0:f9065ea26a3d:
/* * Lab #: 4 * Lab Title: Counting in binary with loops * Author(s): Wade Samples * Date: 04/14/2021 * Purpose: Conditional loops */ #include "mbed.h" #include "TTU_CSC1300.h" BusOut all_leds (LED0_PIN, LED1_PIN, LED2_PIN); int main() { //this while(TRUE) loop keeps the program running while(TRUE) { while (sw5 == true) { all_leds = 7; wait_ms(10); all_leds = 0; } do{ int i; for (i = 0; i <= 7; i++) { all_leds = i; wait_ms(300); } }while (sw5 == false); } }