A simple serial test program for the LM75B library.

Dependencies:   LM75B mbed

Files at this revision

API Documentation at this revision

Comitter:
neilt6
Date:
Wed Aug 14 05:03:01 2013 +0000
Child:
1:94af70628683
Commit message:
Initial commit

Changed in this revision

LM75B.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LM75B.lib	Wed Aug 14 05:03:01 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/neilt6/code/LM75B/#2b797c309258
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 14 05:03:01 2013 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "LM75B.h"
+
+LM75B sensor(p28, p27, LM75B::ADDRESS_0);
+
+int main() {
+    while (1) {
+        //Read the temperature
+        float temp = sensor.temp();
+
+        //Print the temperature
+        printf("Temp = %.3f\n", temp);
+
+        //Sleep for 0.5 seconds
+        wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Aug 14 05:03:01 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5798e58a58b1
\ No newline at end of file