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.
Diff: main.cpp
- Revision:
- 0:25a48958f7b8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Sep 28 03:27:05 2017 +0000
@@ -0,0 +1,22 @@
+#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);
+ }
+}