pepe

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Filtro.cpp Source File

Filtro.cpp

00001 #include "alarma.h"
00002 #include "mbed.h"
00003 
00004 float   smoother = 0;
00005 float   f1 = 0;
00006 float   f2 = 0;
00007 float   f3 = 0;
00008 
00009 float Filtro(void){
00010     f1 = Valor;
00011     wait(0.2);
00012     f2 = Valor;
00013     wait(0.2);
00014     f3 = Valor;
00015     smoother = (f1 + f2 + f3)/3;
00016     return smoother;
00017 }