Junichi Katsu
/
mbed_tmp
アナログ入力をPCで表示するプログラムです。
Diff: main.cpp
- Revision:
- 0:7aaa2aa0ce71
- Child:
- 1:92135ec2c2df
diff -r 000000000000 -r 7aaa2aa0ce71 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 06 16:40:11 2015 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +AnalogIn sensor(P20); + +int main() { + while(1) { + float tmp = sensor; + + printf("tmp:%f\r\n",tmp); + + wait(1.0); + } +}