![](/media/cache/profiles/7acba01022004f2ce03bf56ca56ec6f4.50x50_q85.jpg)
use TMP102 with 2 line LCD HD44780
Dependencies: TextLCD mbed TMP102
Revision 0:a25ced1b3e2b, committed 2011-06-16
- Comitter:
- GregMartin
- Date:
- Thu Jun 16 15:50:32 2011 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TMP102.lib Thu Jun 16 15:50:32 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/donatien/code/TMP102/#b469676e9a9e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Thu Jun 16 15:50:32 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/tlunzer/code/TextLCD/#a7c08c5305b3
--- /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; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 16 15:50:32 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da