proyectotecnicas
/
LCD_test
imprime un voltaje leido en el lcd
main.cpp
- Committer:
- josedaparte
- Date:
- 2015-11-26
- Revision:
- 0:a9f60dff8cb6
File content as of revision 0:a9f60dff8cb6:
#include "mbed.h" #include "TextLCD.h" #include "AnalogIn.h" AnalogIn leer(PTC1); TextLCD lcd(PTE20, PTE21, PTE22, PTE23, PTB20, PTE30, TextLCD::LCD16x2); int main() { float lectura; float voltaje; while(1){ lectura = leer.read(); voltaje = lectura*3.3; lcd.cls(); lcd.printf("%f",lectura); lcd.locate(1,1); lcd.printf("%f", voltaje); wait(2); } }