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(p5,p6,p7,p8,p9,p10); 00005 AnalogIn ldr(p15); 00006 int main() 00007 { 00008 {lcd.cls(); 00009 wait_ms(0.02); 00010 lcd.locate(0,0); 00011 lcd.printf("SENSOR OUTPUT VOLTAGE");} 00012 00013 while(1) 00014 {int ldr_value=ldr; 00015 float voltage=ldr_value*(5.0/1023.0); 00016 lcd.locate(1,1); 00017 lcd.printf("%0.0f",voltage); 00018 lcd.printf("Volt"); 00019 } 00020 00021 }
Generated on Sat Aug 13 2022 19:27:31 by
1.7.2