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 2:18597e0a246f, committed 2022-12-02
- Comitter:
- lucydamon
- Date:
- Fri Dec 02 00:19:49 2022 +0000
- Parent:
- 1:101ffcb3157f
- Commit message:
- added some code to read temperature outputs and voltage- NOTE temperature readings are not correct due to the incorrect temperature equation- I still cannot figure out correct equation.
Changed in this revision
LM19_Driver.cpp | Show annotated file Show diff for this revision Revisions of this file |
LM19_Driver.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LM19_Driver.cpp Thu Dec 01 23:58:06 2022 +0000 +++ b/LM19_Driver.cpp Fri Dec 02 00:19:49 2022 +0000 @@ -9,6 +9,13 @@ } +float LM19::temp() +{ + float temp=_in1.read()*3.3; + return temp; + +} + float LM19::volt() { float volt=_in1.read()*3.3;
--- a/LM19_Driver.h Thu Dec 01 23:58:06 2022 +0000 +++ b/LM19_Driver.h Fri Dec 02 00:19:49 2022 +0000 @@ -9,7 +9,8 @@ public: LM19(PinName in1); float c1, c2, c3, c4; - float volt(); + float temp(); + float volt(); private: AnalogIn _in1;