Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:49554dcad20d, committed 2016-09-04
- Comitter:
- yu10078999
- Date:
- Sun Sep 04 07:42:25 2016 +0000
- Commit message:
- 0
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 Sun Sep 04 07:42:25 2016 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" + +AnalogIn lm35(A0); +Serial pc(USBTX, USBRX); + +int main() { + float val,tempC,tempF; + while(1) + { + val=lm35.read(); + tempC=(val*2.8f*100); + tempF=(9.0f*tempC)/5.0f + 32.0f; + printf("%.2f\n%.2f\n",tempC,tempF); + wait(2); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Sep 04 07:42:25 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/2241e3a39974 \ No newline at end of file