hin you / Mbed 2 deprecated Temperature

Dependencies:   TextLCD mbed

Committer:
youhinclark
Date:
Mon Aug 03 10:34:33 2015 +0000
Revision:
1:b7c052bec578
Parent:
0:d86587ed9b1c
Temperature

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hasimo 0:d86587ed9b1c 1 #include "mbed.h"
hasimo 0:d86587ed9b1c 2 #include "TextLCD.h"
hasimo 0:d86587ed9b1c 3
hasimo 0:d86587ed9b1c 4 TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
hasimo 0:d86587ed9b1c 5 AnalogIn ain(p15);
hasimo 0:d86587ed9b1c 6
hasimo 0:d86587ed9b1c 7 int main() {
hasimo 0:d86587ed9b1c 8 float adc;
hasimo 0:d86587ed9b1c 9
hasimo 0:d86587ed9b1c 10 while (1){
youhinclark 1:b7c052bec578 11 adc=ain.read();
hasimo 0:d86587ed9b1c 12 lcd.locate(0,0);
youhinclark 1:b7c052bec578 13 adc=adc*3.3*100;
youhinclark 1:b7c052bec578 14 lcd.printf("%8.1f \n", adc);
hasimo 0:d86587ed9b1c 15 wait(0.05); // 20Hz update rate
hasimo 0:d86587ed9b1c 16 }
hasimo 0:d86587ed9b1c 17 }