Created
January 8, 2022 19:13
-
-
Save loginov-rocks/5bcba13a50df0c58ede9b2d18fece709 to your computer and use it in GitHub Desktop.
DIY Connected Espresso Machine: Main Class and Indicators (Part 5) - EspressoMachine Header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef EspressoMachine_h | |
#define EspressoMachine_h | |
#include "Relay.h" | |
#include "Boiler.h" | |
#include "Toggle.h" | |
class EspressoMachine | |
{ | |
private: | |
Relay pump; | |
Boiler boiler; | |
Toggle toggle; | |
int donePin; | |
EspressoMachineCommand lastCommand = EspressoMachineCommand::Off; | |
boolean isCommandChanged = false; | |
boolean isDone = false; | |
void setCommand(EspressoMachineCommand); | |
void operateDone(); | |
public: | |
EspressoMachine(int, int, int, int, int, int); | |
// Components getters. | |
boolean getPumpState(); | |
boolean getBoilerState(); | |
BoilerTemp getBoilerTemp(); | |
BoilerTemp getBoilerTargetTemp(); | |
ToggleState getToggleState(); | |
// Getters. | |
EspressoMachineCommand getCommand(); | |
boolean getIsCommandChanged(); | |
boolean getIsDone(); | |
// Commands. | |
boolean command(EspressoMachineCommand); | |
// Processors. | |
void work(); | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment