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
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 00005 TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 00006 AnalogIn ain(p15); 00007 00008 int main() { 00009 float adc, volts, N; 00010 00011 while (1){ 00012 lcd.locate(0,0); 00013 adc = ain.read(); // read analog as a float 00014 volts = adc ; // convert to volts 00015 N = volts * 16 ; 00016 lcd.printf("%8.3f N\n", N); 00017 00018 wait(0.05); // 20Hz update rate 00019 } 00020 }
Generated on Wed Aug 3 2022 08:09:16 by
1.7.2