Junichi Katsu
/
mbed_tmp
アナログ入力をPCで表示するプログラムです。
main.cpp@1:92135ec2c2df, 2015-03-06 (annotated)
- Committer:
- jksoft
- Date:
- Fri Mar 06 22:10:43 2015 +0000
- Revision:
- 1:92135ec2c2df
- Parent:
- 0:7aaa2aa0ce71
????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:7aaa2aa0ce71 | 1 | #include "mbed.h" |
jksoft | 0:7aaa2aa0ce71 | 2 | |
jksoft | 0:7aaa2aa0ce71 | 3 | AnalogIn sensor(P20); |
jksoft | 0:7aaa2aa0ce71 | 4 | |
jksoft | 0:7aaa2aa0ce71 | 5 | int main() { |
jksoft | 0:7aaa2aa0ce71 | 6 | while(1) { |
jksoft | 1:92135ec2c2df | 7 | float ain = sensor; |
jksoft | 0:7aaa2aa0ce71 | 8 | |
jksoft | 1:92135ec2c2df | 9 | printf("tmp:%f\r\n",ain); |
jksoft | 0:7aaa2aa0ce71 | 10 | |
jksoft | 0:7aaa2aa0ce71 | 11 | wait(1.0); |
jksoft | 0:7aaa2aa0ce71 | 12 | } |
jksoft | 0:7aaa2aa0ce71 | 13 | } |
jksoft | 1:92135ec2c2df | 14 |