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:
- SMART_CLEO
- Date:
- 2017-09-28
- Revision:
- 0:25a48958f7b8
File content as of revision 0:25a48958f7b8:
#include "mbed.h"
#include "TextLCD.h"
PinName pin_SOUND = PC_3;
AnalogIn adc_SOUND(pin_SOUND);
// rs, rw, e, d0-d3
TextLCD lcd(PB_12, PB_13, PB_14, PB_15, PA_9, PA_10, PA_11);
int main() {
int volt;
lcd.printf(" SOUND Program\n");
lcd.printf(" Volt : [mV]");
while(1) {
volt = adc_SOUND.read()*3300;
lcd.locate(8, 1);
lcd.printf("%4d", volt);
wait(0.5);
}
}