Salinity and temperature sensors are implemented in classes.

Dependencies:   mbed

Revision:
3:7c648d1d8802
Parent:
2:ed17e258da0d
Child:
5:4cbe44452889
--- a/TemperatureSensor.h	Tue Jun 14 09:14:24 2016 +0000
+++ b/TemperatureSensor.h	Thu Jun 16 11:28:59 2016 +0000
@@ -1,17 +1,21 @@
 /*
 * G3: WATERPLAY
+
+
+
 */
 
 #ifndef TEMPERATURE_SENSOR_H
 #define TEMPERATURE_SENSOR_H
 
 #include "mbed.h"
+#include "Printer.h"
 
 class TemperatureSensor
 {
 public:
     TemperatureSensor(
-        mbed::Serial &serial,
+        Printer &printer,
         PinName pin,
         double const_voltage,
         double const_converter,
@@ -26,14 +30,16 @@
     double getVoltage();
     double getTemperature();
     double getStatus();
+    char* getStrStatus();
 
 private:
-    Serial &_serial;
+    Printer &_printer;
     AnalogIn _analog_in;
     double _const_voltage;
     double _const_converter;
     double _const_lower_boundary;
     double _const_upper_boundary;
+    int _const_sample_number;
     double _variance;
     double _vin;
     double _resistance;
@@ -41,6 +47,7 @@
     double _voltage;
     double _temperature;
     double _status;
+    char* _strStatus;
     double _k0;
     double _k1;
     double _k2;