Uploading sensor data (voltage divider, MAX4172, INA219) over Ethernet to Thing Speak service. Uses old mbed revision that is compatible with NetServices library. I2C communication is made with I2CR library.

Dependencies:   C12832 I2CR INA219 NetServices mbed

Fork of NetServices_HelloWorld by Segundo Equipo

Revision:
7:1da0a084cd69
Parent:
6:ebbde59c5a1d
Child:
8:9b35ac104ab7
--- a/Sensor.h	Fri Nov 20 08:28:11 2015 +0000
+++ b/Sensor.h	Sun Nov 29 13:41:05 2015 +0000
@@ -1,3 +1,19 @@
+/** Simple class for sensor with linear otuput. Made for later upgrading, to avarage values from ADC
+ * Example:
+ * @code
+ * #include "mbed.h"
+ * #include "Sensor.h"
+ * #include "INA219_reg.h"
+ *
+ * Sensor voltageDivider(p20,5);
+ * float value;
+ *
+ * int main() {
+ *     value = voltageDivider.read();
+ * }
+ * @endcode
+
+*/
 #ifndef _SENSOR_H
 #define SENSOR_H  
 #include "mbed.h"
@@ -5,12 +21,17 @@
 class Sensor {
      
      public:
-     
-        Sensor(PinName, float);    //* Konsturktor klase Sensor koji uzima kao argument pin na kojem je spojen senzor može biti od p15-p20 *//
-                                    //* i varijablu float kao koeficijent množenja vrijednosti dobivene ADC pretvorbom
-        void read();                 //* Funkcija read() bez povratnog argumenta ocitava vrijednost 10 puta i spremaju u float polje
-        float calc();                 //* Fukcija calac() raćuna srednju vrijednost readVal polja te vraća float varijablu sa stvarnom vrijednosti 
-                                       //* mjernog signala 
+    /**
+     * @param: PinName of ADC to which sensor is connected
+     *        float value for multiplifing with raw value from ADC to get real value
+    */    
+    Sensor(PinName, float);    
+    /** Read real messured value
+     * return: float real messured value 
+     *
+    **/                               
+        float read();                                   
+                                       
      private:
      
         AnalogIn sensorInput;