Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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);
}
}
