Este programa funciona perfecto
Dependencies: Keypad TextLCD mbed
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 #include "Keypad.h" 00004 00005 Serial rs232 (USBTX, USBRX); 00006 AnalogIn AN0 (PTB0); float valor_adc; 00007 char Keytale[]= {'1' , '2', '3', 'A', 00008 '4' , '5', '3', 'B', 00009 '7' , '8', '3', 'C', 00010 '*' , '0', '#', 'D'}; 00011 00012 TextLCD lcd(PTE20,PTE21,PTE22,PTE23,PTE29,PTE30); //rs en d4 d5 d6 d7 00013 int main() { 00014 lcd.printf("MEDIDA ANALOGA"); 00015 wait(1); 00016 while(true) { 00017 valor_adc= AN0; 00018 valor_adc= 1000*valor_adc; 00019 00020 lcd.printf("%f\n\r",valor_adc);; 00021 wait(0.1); 00022 } 00023 }
Generated on Wed Jul 13 2022 03:04:48 by 1.7.2