Thermometer

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
shingo_n
Date:
Mon May 09 10:15:41 2011 +0000
Commit message:

Changed in this revision

TextLCD.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 3a2b2c8eb1dc TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon May 09 10:15:41 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
diff -r 000000000000 -r 3a2b2c8eb1dc main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 09 10:15:41 2011 +0000
@@ -0,0 +1,28 @@
+//
+// Thermometer for LM35DZ with Starboard Orange
+// 
+
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+AnalogIn ain(p15);
+Serial pc(USBTX,USBRX);
+
+int main() {
+    float temp;
+    
+    //initialize
+    pc.baud(19200);                 //19200bps    
+ 
+    //main loop   
+    while(1){
+        temp = ain * 330;
+        
+        pc.printf("Temp: %2.2f\n",temp);
+        lcd.locate(0,0);
+        lcd.printf("Temp: %2.2f",temp);
+
+        wait(1.0);
+    }
+}
diff -r 000000000000 -r 3a2b2c8eb1dc mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon May 09 10:15:41 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912