SDk for temperature sensor

Dependencies:   C12832_lcd LM75B mbed

Files at this revision

API Documentation at this revision

Comitter:
Oneoftherulingparty
Date:
Sun Feb 02 07:54:47 2014 +0000
Commit message:
my first mbed sdk

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
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
diff -r 000000000000 -r 32cb72f4d93a C12832_lcd.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Sun Feb 02 07:54:47 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
diff -r 000000000000 -r 32cb72f4d93a LM75B.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LM75B.lib	Sun Feb 02 07:54:47 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/neilt6/code/LM75B/#3a44310726fe
diff -r 000000000000 -r 32cb72f4d93a Main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Main.cpp	Sun Feb 02 07:54:47 2014 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+#include "LM75B.h"
+
+#include "C12832_lcd.h"
+PwmOut r (p23);
+PwmOut g (p24);
+PwmOut b (p25);
+C12832_LCD lcd;
+LM75B tmp(p28,p27);
+
+int main ()
+{
+    while (1) {
+        lcd.cls();
+        lcd.locate(0,3);
+         //define the primary position of display.
+        lcd.printf("Room Temp. :%.2foC",tmp.read()); //output char.
+        wait(0.1);
+        for(float i = 0.0; i < 1.0 ; i += 0.01) {
+            float p = (((tmp.read()/100)-0.298)*60); //define the variation of color.
+            r = 1.0 - ((p < 1.0) ? 1.0 - p : (p > 2.0) ? p - 2.0 : 0.0);
+            g = 1.0 - ((p < 1.0) ? p : (p > 2.0) ? 0.0 : 2.0 - p);
+            b = 1.0 - ((p < 1.0) ? 0.0 : (p > 2.0) ? 3.0 - p : p - 1.0);  ;
+            wait (0.01);
+        }
+
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 32cb72f4d93a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Feb 02 07:54:47 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file