T Umezawa
/
light6
Checking temperature
Revision 0:b6605fb3b120, committed 2020-12-29
- Comitter:
- umezawa
- Date:
- Tue Dec 29 05:31:51 2020 +0000
- Commit message:
- test
Changed in this revision
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Dec 29 05:31:51 2020 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +Serial pc(USBTX, USBRX); +AnalogIn tem(A6); +DigitalOut conv(A3); + +int main() +{ + double temper; + conv = 1; + wait(0.5); + for(int i = 0; i<10; i++) { + temper = (tem.read()*3.3-0.6)*100; + pc.printf("Tem=%f\r\n",temper); + wait(0.5); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Dec 29 05:31:51 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file