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:
- corbindenham
- Date:
- 2020-11-18
- Revision:
- 1:e68c879b0651
- Parent:
- 0:b0571bc84ca0
File content as of revision 1:e68c879b0651:
#include "mbed.h" /* * Lab #: 2 * Lab Title: Hardware Lab 2 * Author(s): Corbin Denham * Date: 11/13/20 * Purpose: To learn how to code potentiometer */ #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 = f_value * 25 + 20; speaker = TRUE; led0 = TRUE; wait_ms(10); speaker = FALSE; led0 = FALSE; wait_ms(f_value); } }