Daniel Blomdahl / Mbed 2 deprecated multiple_variable_temp

Dependencies:   MAX31855 SDFileSystem mbed

main.cpp

Committer:
DanielBlomdahl
Date:
2016-03-03
Revision:
0:42e8fa13c7a9
Child:
1:8116bd9d3c46

File content as of revision 0:42e8fa13c7a9:

#include "mbed.h"
#include "TMP102.h"

I2C i2c(PTE25, PTE24);
TMP102 temperature(i2c,0x90);  // i2c, address
/* The TMP102 board has an address of 0x90 if ADD0 is connected to ground */

Serial pc(USBTX,USBRX);

int main()
{
   float currentTemp;
   while (true) {
       currentTemp = temperature.read();
       pc.printf("T = %.2fC\r\n", currentTemp);
       wait(0.5);
   }
}