Viking Skull Lamp
V1.0.1
|
#include "fogMachine.hpp"
Go to the source code of this file.
Functions | |
void | fogMachineInit () |
Initialize the fog machine( humidifier ). More... | |
void | fogMachineUpdate () |
Update the fog machine state. More... | |
void | fogMachineEnable () |
Enable the humidifier. More... | |
Variables | |
unsigned long | fogMachineTimer = 0 |
This variable is used for automatic humidification. More... | |
unsigned long | fogLastTurnOn = 0 |
This variable stores the last system time when the humidifier was turned on by any reason. More... | |
unsigned long | fogCoolDownTimer = 0 |
This variable stores the last system time when the cool down event happened. More... | |
bool | fogCoolDown = false |
If the cool down procedure still in progress, this flag will be true. More... | |
void fogMachineEnable | ( | ) |
Enable the humidifier.
This function turns on the humidifier if:
Definition at line 167 of file fogMachine.cpp.
void fogMachineInit | ( | ) |
Initialize the fog machine( humidifier ).
Definition at line 50 of file fogMachine.cpp.
void fogMachineUpdate | ( | ) |
Update the fog machine state.
This function should be called periodically. It handles the state machine of the humidifier. The humidifier module can not work for a long period of time with dry tank, because it will overheat. We doesn't have any sensor to monitor the liquid level in the tank, so I implemented the simplest solution:
Also if the humidifier is enabled for periodic humidification we have to calculate when to start the automatic humidification next.
Definition at line 57 of file fogMachine.cpp.
bool fogCoolDown = false |
If the cool down procedure still in progress, this flag will be true.
Definition at line 48 of file fogMachine.cpp.
unsigned long fogCoolDownTimer = 0 |
This variable stores the last system time when the cool down event happened.
From this time whe should not turn on the humidifier for HUMIDIFIER_COOL_DOWN duration.
Definition at line 45 of file fogMachine.cpp.
unsigned long fogLastTurnOn = 0 |
This variable stores the last system time when the humidifier was turned on by any reason.
Definition at line 39 of file fogMachine.cpp.
unsigned long fogMachineTimer = 0 |
This variable is used for automatic humidification.
It stores the last system time when the humidifier was turned on by the automated logic.
Definition at line 35 of file fogMachine.cpp.