![](/media/cache/profiles/7acba01022004f2ce03bf56ca56ec6f4.50x50_q85.jpg)
use TMP102 with 2 line LCD HD44780
Dependencies: TextLCD mbed TMP102
Diff: main.cpp
- Revision:
- 0:a25ced1b3e2b
diff -r 000000000000 -r a25ced1b3e2b main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 16 15:50:32 2011 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "TextLCD.h" +#include "TMP102.h" +float val; +TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground +TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 but could use 27,28,29,30 instead of 17,18,19,20 +int main() +{ +while(1){ +val=temperature.read(); + printf("Temperature: %f\n", temperature.read()); + //lcd.printf("%f \n",temperature.read()); + lcd.printf("%f \n",val); + + wait(0.5); +} +return 0; +}