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 TextLCD lcd(p10, p12, p15, p16, p29, p30, TextLCD::LCD20x2); // rs, e, d0-d3 00005 AnalogIn ain(p20); 00006 00007 00008 int main() { 00009 //while(1) { 00010 lcd.cls(); 00011 lcd.locate(7, 0); 00012 lcd.printf("Percent is"); 00013 lcd.locate(9, 1); 00014 lcd.printf("%.3f\n",100*ain.read()); 00015 00016 //lcd.printf("Percent is %.1f\n",100*ain.read()); 00017 //lcd.printf("Voltage is %.3f\n",3.3*ain.read()); 00018 } 00019 //}
Generated on Thu Aug 18 2022 14:55:53 by
1.7.2