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.
LM19_Driver.cpp@0:929925da937d, 2022-11-24 (annotated)
- Committer:
- lucydamon
- Date:
- Thu Nov 24 02:11:25 2022 +0000
- Revision:
- 0:929925da937d
- Child:
- 1:101ffcb3157f
drivers and code finished forgot to commit in between
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| lucydamon | 0:929925da937d | 1 | #include "mbed.h" |
| lucydamon | 0:929925da937d | 2 | |
| lucydamon | 0:929925da937d | 3 | LM19::LM19(PinName in1): _in1(in1) |
| lucydamon | 0:929925da937d | 4 | { |
| lucydamon | 0:929925da937d | 5 | c1 = -1481.96; |
| lucydamon | 0:929925da937d | 6 | c2 = 2.1962*1000000.000; |
| lucydamon | 0:929925da937d | 7 | c3 = 1.8636; |
| lucydamon | 0:929925da937d | 8 | c4 = 3.88/1000000.000; |
| lucydamon | 0:929925da937d | 9 | |
| lucydamon | 0:929925da937d | 10 | } |
| lucydamon | 0:929925da937d | 11 | |
| lucydamon | 0:929925da937d | 12 | float LM19::volt() |
| lucydamon | 0:929925da937d | 13 | { |
| lucydamon | 0:929925da937d | 14 | float volt=_in1.read()*3.3; |
| lucydamon | 0:929925da937d | 15 | return volt; |
| lucydamon | 0:929925da937d | 16 | |
| lucydamon | 0:929925da937d | 17 | } |