describe una lectura analogica basica

Dependencies:   TextLCD mbed

main.cpp

Committer:
tony63
Date:
2013-10-03
Revision:
1:d4b9822b8df4
Parent:
0:fd817c22d584
Child:
2:7d8925e51f85

File content as of revision 1:d4b9822b8df4:

// ejemplo lectura analoga
// EJEMPLO CON UN LCD PARA EL MODULO FRDM-KL25Z PARA LECTURA ANALOGA

#include "mbed.h"
#include "TextLCD.h"
AnalogIn Vin(PTC2);
TextLCD lcd(PTB10, PTB11, PTE2, PTE3, PTE4, PTE5); // rs, e, d4-d7

int main( ){
    
    lcd.cls();
    wait(0.5);
    while(1){
    lcd.cls();
    lcd.printf("V(%f)", Vin.read());
    wait(0.5);
}
}