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 LCD_test by
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 #include "AnalogIn.h" 00004 00005 AnalogIn leer(PTC2); 00006 00007 TextLCD lcd(PTD3, PTA12, PTA4, PTA5, PTC8, PTC9, TextLCD::LCD16x2); 00008 00009 int main() { 00010 00011 float temperatura; 00012 float voltajecas; 00013 uint16_t adcvalue; 00014 00015 while(1){ 00016 lcd.cls(); 00017 adcvalue = leer.read_u16(); 00018 voltajecas = adcvalue*3.3/65525; 00019 lcd.printf("El Vcas es %.2f", voltajecas); 00020 temperatura = voltajecas * 100 / 5 + 0.04; 00021 lcd.locate(0,1); 00022 lcd.printf("Hace %.0f grados", temperatura); 00023 wait(1.5); 00024 00025 00026 00027 } 00028 }
Generated on Fri Jul 15 2022 13:08:52 by
1.7.2
