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.
Fork of TextLCD_HelloWorld by
main.cpp
00001 // Hello World! for the TextLCD 00002 00003 #include "mbed.h" 00004 #include "TextLCD.h" 00005 00006 TextLCD lcd(p25, p26, p24, p23, p22, p21); // rs, e, d4-d7 00007 Serial pc(USBTX,USBRX); 00008 AnalogIn voltage(p15); 00009 int main() 00010 { 00011 while (1){ 00012 lcd.printf("Voltage in fraction: %2.4f\n\r", voltage.read());//voltage is name 00013 pc.printf("Voltage in fraction: %2.4f\n\r", voltage.read()); 00014 //lcd.printf("Voltage in fraction\n"); 00015 //lcd.printf("SVK\n"); 00016 wait(5); 00017 lcd.printf("Voltage in integer: %6d\n\r", voltage.read_u16()); 00018 pc.printf("Voltage in integer: %6d\n\r", voltage.read_u16()); 00019 wait(5); 00020 } 00021 }
Generated on Thu Aug 25 2022 21:26:35 by
1.7.2
