温度テスト

Dependencies:   SB1602E mbed

Files at this revision

API Documentation at this revision

Comitter:
tek7077
Date:
Mon Sep 12 09:54:58 2016 +0000
Commit message:
??

Changed in this revision

SB1602E.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 7cd04e63ec48 SB1602E.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SB1602E.lib	Mon Sep 12 09:54:58 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/okano/code/SB1602E/#baf578069dfc
diff -r 000000000000 -r 7cd04e63ec48 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 12 09:54:58 2016 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "SB1602E.h"
+
+
+AnalogIn sensor(A3);
+Serial pc(USBTX,USBRX);
+I2C i2c( p22, p20 );
+SB1602E lcd( i2c );    //  SDA, SCL
+
+
+//SB1602E lcd( p28, p27 );  //  SDA, SCL
+
+
+ 
+int main() {
+   
+    while(1) {
+        float Temperature;
+        
+        Temperature = (sensor*3.3-0.6)/0.01;
+        
+        pc.printf("Temperature=%\r\n",Temperature);
+        
+       
+        lcd.printf(0.0,"%.2f",Temperature);
+        
+        wait(1.0);
+    }
+}
+ 
\ No newline at end of file
diff -r 000000000000 -r 7cd04e63ec48 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Sep 12 09:54:58 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file