This is a Testing library

Files at this revision

API Documentation at this revision

Comitter:
javiersing
Date:
Mon Nov 28 12:58:43 2016 +0000
Commit message:
This is a Testing library

Changed in this revision

DecagonEC-5.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DecagonEC-5.h	Mon Nov 28 12:58:43 2016 +0000
@@ -0,0 +1,8 @@
+float MoistEC5(AnalogIn moist)
+{
+    float value = moist.read(); // lee el puerto analogico y lo muestra de 0-1V
+    float V = value * 3.3; // convertimos lectura analogica 0-1V al de referencia en este caso 3.3V
+    float mV = V * 1000; // pasamos a mV
+    float VWC = (0.00133 * mV)- 0.456; // pasamos a VWC
+    return VWC;
+}
\ No newline at end of file