Mario Simaremare
/
g3_waterplay
Salinity and temperature sensors are implemented in classes.
Diff: Thermostat.h
- Revision:
- 5:4cbe44452889
- Parent:
- 2:ed17e258da0d
- Child:
- 12:7a48b90b493e
diff -r d8914369bf82 -r 4cbe44452889 Thermostat.h --- a/Thermostat.h Fri Jun 17 09:24:01 2016 +0000 +++ b/Thermostat.h Fri Jun 17 11:03:37 2016 +0000 @@ -5,24 +5,31 @@ #ifndef THERMOSTAT_H #define THERMOSTAT_H +#include "Printer.h" #include "mbed.h" class Thermostat { public: Thermostat( - mbed::Serial &serial, + Printer &printer, PinName pin, PinName led_pin ); + static const int STATUS_ON = 1; + static const int STATUS_OFF = 0; int on(); int off(); int react(double temperature); + char* getStrStatus(); private: - Serial &_serial; + Printer &_printer; AnalogOut _analog_out; DigitalOut _led; + int _status; + char* _strStatus; + int update(); }; #endif \ No newline at end of file