Masayoshi Takahashi / Mbed 2 deprecated SensorSample

Dependencies:   TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "TextLCD.h"
00003 
00004 AnalogIn ain(p15);
00005 DigitalOut myled(LED1);
00006 TextLCD lcd(p24, p26, p27, p28, p29, p30);
00007 float temp;
00008 
00009 int main() {
00010     while(1) {
00011         temp = ain * 3.3 * 100;
00012         lcd.cls();
00013         lcd.locate(0,0);
00014         lcd.printf("temp: %4.2f",temp);
00015         wait(1);
00016     }
00017 }