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
Diff: main.cpp
- Revision:
- 0:42e8fa13c7a9
- Child:
- 1:8116bd9d3c46
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Mar 03 16:24:22 2016 +0000
@@ -0,0 +1,18 @@
+#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);
+ }
+}
\ No newline at end of file
