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.
Diff: Filtro.cpp
- Revision:
- 0:f42f18c56a88
diff -r 000000000000 -r f42f18c56a88 Filtro.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Filtro.cpp Sat Nov 16 00:48:19 2013 +0000
@@ -0,0 +1,17 @@
+#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;
+}
\ No newline at end of file