Pedro Colla / Mbed 2 deprecated CTo_VyV_TPAlarma

Dependencies:   mbed

Filtro.cpp

Committer:
pcolla
Date:
2013-11-16
Revision:
0:f42f18c56a88

File content as of revision 0:f42f18c56a88:

#include "alarma.h"
#include "mbed.h"

float   smoother = 0;
float   f1 = 0;
float   f2 = 0;
float   f3 = 0;

float Filtro(void){
    f1 = Valor;
    wait(0.2);
    f2 = Valor;
    wait(0.2);
    f3 = Valor;
    smoother = (f1 + f2 + f3)/3;
    return smoother;
}