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-06
- Revision:
- 0:dbe3cde11a0a
File content as of revision 0:dbe3cde11a0a:
/* * Lab #: * Lab Title: * Author(s): * Date: * Purpose: */ #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) { //WRITE SOLUTION HERE float f_value(0); f_value = pot.read(); f_value=f_value*20; f_value=f_value+20; speaker = TRUE; //will turn the speaker on, sending a single square wave led0 = TRUE; wait_ms(10); //delays for 250 ms speaker = FALSE; //will turn the speaker off wait_ms(f_value); } }