Skip to content

Instantly share code, notes, and snippets.

@loginov-rocks
Created June 5, 2021 17:02
Show Gist options
  • Save loginov-rocks/bf00abfa41bdae9f0755f1e1da09a3b7 to your computer and use it in GitHub Desktop.
Save loginov-rocks/bf00abfa41bdae9f0755f1e1da09a3b7 to your computer and use it in GitHub Desktop.
DIY Connected Espresso Machine: Boiler (Part 3) - Boiler.h
#ifndef Boiler_h
#define Boiler_h
#include "Relay.h"
enum class BoilerTemp
{
Cold,
Boiling,
Steam
};
class Boiler : private Relay
{
private:
int isBoilingPin;
int isSteamPin;
BoilerTemp targetTemp = BoilerTemp::Cold;
public:
Boiler(int, int, int);
// Getters.
boolean getState();
BoilerTemp getTemp();
BoilerTemp getTargetTemp();
// Setters.
void setTargetTemp(BoilerTemp);
// Processors.
void work();
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment