ADC

Dependencies:   ADC

Dependents:   termometro

Committer:
DanielOlarte
Date:
Sat Nov 19 18:57:58 2016 +0000
Revision:
0:969bd4f60e3f
ADC

Who changed what in which revision?

UserRevisionLine numberNew 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 }