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 00002 #include "mbed.h" 00003 #include "TextLCD.h" 00004 00005 TextLCD lcd(D8, D9, D4, D5, D6, D7); 00006 Serial pc(USBTX, USBRX); 00007 AnalogIn Ain(PC_3); 00008 DigitalIn pb (PA_12); 00009 float ADCdata; 00010 00011 int main() { 00012 lcd.cls(); 00013 lcd.locate(1,0); 00014 lcd.printf ("Temp Measure"); 00015 00016 while (1) 00017 { 00018 ADCdata=Ain; 00019 ADCdata=ADCdata*100; 00020 00021 00022 if (pb == 0) 00023 { 00024 lcd.locate (0,1); 00025 lcd.printf ("Cel:"); 00026 00027 lcd.locate (4,1); 00028 lcd.printf ("%2.2f", ADCdata); 00029 00030 } 00031 else if (pb == 1) 00032 { 00033 00034 lcd.locate (8,1); 00035 lcd.printf ("Fah:", ADCdata); 00036 00037 lcd.locate (12,1); 00038 lcd.printf ("%2.2f", ADCdata); 00039 00040 } 00041 wait (0.5); 00042 } 00043 }
Generated on Thu Jul 14 2022 15:03:50 by
1.7.2