ok

Dependencies:   mbed

Fork of g3_waterplay by Mario Simaremare

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Thermostat.h Source File

Thermostat.h

00001 /*
00002 * G3: WATERPLAY
00003 */
00004 
00005 #ifndef THERMOSTAT_H
00006 #define THERMOSTAT_H
00007 
00008 #include "Printer.h"
00009 #include "mbed.h"
00010 
00011 class Thermostat
00012 {
00013 public:
00014     Thermostat(
00015         Printer &printer,
00016         PinName pin,
00017         PinName led_pin
00018     );
00019     static const int STATUS_ON = 1;
00020     static const int STATUS_OFF = 0;
00021     int on();
00022     int off();
00023     int react(double temperature);
00024     char* getStrStatus();
00025 
00026 private:
00027     Printer &_printer;
00028     AnalogOut _analog_out;
00029     DigitalOut _led;
00030     int _status;
00031     char* _strStatus;
00032     int update();
00033 };
00034 
00035 #endif