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: SensorAnalogico.cpp
- Revision:
- 0:f42f18c56a88
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorAnalogico.cpp Sat Nov 16 00:48:19 2013 +0000
@@ -0,0 +1,17 @@
+#include "alarma.h"
+#include "mbed.h"
+
+float lectura = 0;
+float referencia = 0;
+
+int SensorAnalogico(void){
+ lectura = Filtro();
+ referencia = Ref; //Pot1
+ if(lectura <= referencia)
+ AStatus = 1;
+ if(lectura > referencia)
+ AStatus = 2;
+ if((lectura >= 0)&&(lectura <0.1))
+ AStatus = 0;
+ return AStatus;
+}
\ No newline at end of file