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(D8, D9, D4, D5, D6, D7); 00005 Serial pc(USBTX, USBRX); 00006 AnalogIn Ain(PC_3); 00007 float ADCdata; 00008 00009 int main() { 00010 lcd.printf("LDR ="); 00011 while (1) 00012 { 00013 ADCdata=Ain; 00014 ADCdata=ADCdata*100; 00015 lcd.locate (4,1); 00016 lcd.printf("%f",ADCdata); 00017 pc.printf("%f \n\r",ADCdata); 00018 wait (0.5); 00019 } 00020 }
Generated on Sat Aug 27 2022 05:31:51 by
1.7.2