Yasushi TAUCHI
/
Analog_test_2
アナログ入力のテスト(温度センサ)
Revision 0:e5e36e0aa748, committed 2011-12-26
- Comitter:
- yueee_yt
- Date:
- Mon Dec 26 08:18:16 2011 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Mon Dec 26 08:18:16 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 26 08:18:16 2011 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "TextLCD.h" + +TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 +AnalogIn temp(p20); + +int main() { + lcd.cls(); + lcd.printf("Temperature \n"); + while (1) { + lcd.locate(0,1); + lcd.printf("%4.2f Deg",temp.read()*330.0); + wait(0.1f); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 26 08:18:16 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e