hin you / Mbed 2 deprecated Temperature

Dependencies:   TextLCD mbed

main.cpp

Committer:
youhinclark
Date:
2015-08-03
Revision:
1:b7c052bec578
Parent:
0:d86587ed9b1c

File content as of revision 1:b7c052bec578:

#include "mbed.h"
#include "TextLCD.h"

TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
AnalogIn ain(p15);

int main() {
    float adc;
    
    while (1){
        adc=ain.read();
        lcd.locate(0,0);
        adc=adc*3.3*100;
        lcd.printf("%8.1f \n", adc);
        wait(0.05);                 // 20Hz update rate
    }
}