pepe

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SensorAnalogico.cpp Source File

SensorAnalogico.cpp

00001 #include "alarma.h"
00002 #include "mbed.h"
00003 
00004 float   lectura = 0;
00005 float   referencia = 0;
00006 
00007 int SensorAnalogico(void){
00008     lectura = Filtro();
00009     referencia = Ref;                       //Pot1
00010     if(lectura <= referencia)
00011         AStatus = 1;
00012     if(lectura > referencia)
00013         AStatus = 2;
00014     if((lectura >= 0)&&(lectura <0.1))
00015         AStatus = 0;
00016     return AStatus;
00017 }