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.
Revision 0:bf12b5254bf3, committed 2022-08-03
- Comitter:
- shunsaku000
- Date:
- Wed Aug 03 08:08:53 2022 +0000
- Commit message:
- pressuresensor;
Changed in this revision
diff -r 000000000000 -r bf12b5254bf3 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Wed Aug 03 08:08:53 2022 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r bf12b5254bf3 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 03 08:08:53 2022 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+AnalogIn ain(p15);
+
+int main() {
+ float adc, volts, N;
+
+ while (1){
+ lcd.locate(0,0);
+ adc = ain.read(); // read analog as a float
+ volts = adc ; // convert to volts
+ N = volts * 16 ;
+ lcd.printf("%8.3f N\n", N);
+
+ wait(0.05); // 20Hz update rate
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r bf12b5254bf3 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 03 08:08:53 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file