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:2795fb9c6557, committed 2021-04-09
- Comitter:
- kingcolba
- Date:
- Fri Apr 09 20:10:04 2021 +0000
- Commit message:
- Lab3
Changed in this revision
diff -r 000000000000 -r 2795fb9c6557 TTU_CSC1300.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TTU_CSC1300.lib Fri Apr 09 20:10:04 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/jwbruce/code/TTU_CSC1300/#7bb32dea705b
diff -r 000000000000 -r 2795fb9c6557 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 09 20:10:04 2021 +0000 @@ -0,0 +1,38 @@ +/* + * Lab #: 3 + * Lab Title: Reading and Processing Analog Inputs + * Author(s): Colby Adams + * Date: 5 April 2021 + * Purpose: Conditional Statements + */ + +#include "mbed.h" +#include "TTU_CSC1300.h" + +//FUNCTION PROTOTYPES GO HERE +TextLCD lcd(TextLCD::LCD_CURSOR_ON_BLINKING_ON); + +int main(){ + //this while(TRUE) loop keeps the program running + while(TRUE){ + + float f_value = pot.read(); //f_value > 0.0f && f_value < 1.0f + float timer = (f_value * 25) + 20; + + if ((sw5 == true && timer > 35) || sw4 == true){ + if (led0 == false){ + speaker = true; + led0 = true; + } else if (led0 == true){ + led0 = false; + speaker = true; + } + } else { + if (speaker == true){ + speaker = false; + } else if (speaker == false){ + speaker = true; + } + } + } +} \ No newline at end of file
diff -r 000000000000 -r 2795fb9c6557 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 09 20:10:04 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file