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.
ADC.cpp@1:9431b78ab1c4, 2021-11-20 (annotated)
- Committer:
- daisychain
- Date:
- Sat Nov 20 02:39:06 2021 +0000
- Revision:
- 1:9431b78ab1c4
- Parent:
- 0:969bd4f60e3f
hola
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| DanielOlarte | 0:969bd4f60e3f | 1 | #include "ADC.h" |
| DanielOlarte | 0:969bd4f60e3f | 2 | |
| DanielOlarte | 0:969bd4f60e3f | 3 | double adc::adcx(PinName Sen) |
| DanielOlarte | 0:969bd4f60e3f | 4 | { |
| DanielOlarte | 0:969bd4f60e3f | 5 | _Sen=Sen; |
| DanielOlarte | 0:969bd4f60e3f | 6 | double ent; |
| DanielOlarte | 0:969bd4f60e3f | 7 | AnalogIn lec1(_Sen); |
| DanielOlarte | 0:969bd4f60e3f | 8 | ent = lec1.read_u16(); |
| DanielOlarte | 0:969bd4f60e3f | 9 | wait(0.05); |
| DanielOlarte | 0:969bd4f60e3f | 10 | ent = ent * 0.000050354; |
| DanielOlarte | 0:969bd4f60e3f | 11 | return ent; |
| DanielOlarte | 0:969bd4f60e3f | 12 | } |