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.
Fork of g3_waterplay by
Diff: Thermostat.h
- Revision:
- 5:4cbe44452889
- Parent:
- 2:ed17e258da0d
--- 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