yuuya kimura
/
Temper_Demo
温度テスト
Revision 0:7cd04e63ec48, committed 2016-09-12
- Comitter:
- tek7077
- Date:
- Mon Sep 12 09:54:58 2016 +0000
- Commit message:
- ??
Changed in this revision
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