12static const uint8_t
Version = 11;
44 struct ReservoirModuleSettings
46 ReservoirModuleSettings(
bool SerialReportDate =
true,
bool SerialReportMemory =
true,
bool SerialReportJSONFriendly =
true,
bool SerialReportJSON =
true,
bool SerialReportWireless =
true) : SerialReportDate(SerialReportDate), SerialReportMemory(SerialReportMemory), SerialReportJSONFriendly(SerialReportJSONFriendly), SerialReportJSON(SerialReportJSON), SerialReportWireless(SerialReportWireless) {}
55 struct DHTSensorSettings
61 struct DHTSensorSettings DHT1 = {.Pin = 3, .Type = 22};
65 PHSensorSettings(uint8_t Pin = 0,
float Slope = 0.0,
float Intercept = 0.0) : Pin(Pin), Slope(Slope), Intercept(Intercept) {}
86 struct SoundSettings Sound1 = {.Pin = 2};
95 struct WeightSensorSettings
97 WeightSensorSettings(uint8_t DTPin = 0, uint8_t SCKPin = 0,
long Offset = 0,
float Scale = 0.0) : DTPin(DTPin), SCKPin(SCKPin), Offset(Offset), Scale(Scale) {}
103 struct WeightSensorSettings Weight1 = {.DTPin = 5, .SCKPin = 6, .Offset = 246106, .Scale = -22716.50};
106 uint8_t CompatibilityVersion =
Version;
Settings * loadSettings(bool ResetEEPROM=false)
Load settings from EEPROM.
void restoreDefaults()
Load sketch default settings into EEPROM.
char CurrentTime[MaxWordLength]
Buffer for storing current time in text format.
char LongMessage[MaxLongTextLength]
Temp storage for assembling long messages (REST API, MQTT reporting)
char ShortMessage[MaxShotTextLength]
Temp storage for assembling short text messages (Log entries, Error messages,etc)
void saveSettings(Settings *ToSave)
Store settings in EEPROM - Only updates changed bits.
bool & Debug
True - Turns on extra debug messages on the Serial Output.
bool & Metric
True - Use metric units, False - Use imperial units.
constexpr uint8_t Version
Default Settings for each component within the module. Loaded when the Arduino starts.
constexpr uint16_t WirelessMessageTimeout
(ms) One package should be exchanged within this timeout (Including retries and delays)
constexpr uint8_t WirelessPayloadSize
Size of the wireless packages exchanged with the Main module. Max 32 bytes are supported on nRF24L01+...
constexpr uint8_t WirelessCEPin
nRF24l01+ wireless transmitter CE pin - Pre-connected on RF-Nano
constexpr uint8_t MaxShotTextLength
Default char * buffer length for storing mutiple words. Memory intense!
constexpr uint8_t QueueDepth
Limits the maximum number of active modules. Memory intense!
constexpr uint8_t MaxWordLength
Default char * buffer length for storing a word + null terminator. Memory intense!
constexpr uint16_t MaxLongTextLength
Default char * buffer length for storing a long text. Memory intense!
constexpr uint16_t WirelessReceiveTimeout
(ms) If no packages are received from the Main module over this limit, try reseting the nRF24L01+ wir...
constexpr uint8_t WirelessCSNPin
< nRF24L01+ wireless receiver
constexpr uint8_t WirelessChannel[6]
This needs to be unique and match with the Name of the HempyModule_Web object in the MainModule_Web....
DHTSensorSettings(uint8_t Pin=0, uint8_t Type=0)
< PHSensor default settings
PHSensorSettings(uint8_t Pin=0, float Slope=0.0, float Intercept=0.0)
uint8_t Pin
pH sensor Po pin
< ReservoirModule default settings
ReservoirModuleSettings(bool SerialReportDate=true, bool SerialReportMemory=true, bool SerialReportJSONFriendly=true, bool SerialReportJSON=true, bool SerialReportWireless=true)
bool SerialReportDate
Enable/disable reporting the current time to the Serial output.
bool SerialReportJSON
Enable/disable sending JSON formatted reports to the Serial output.
bool SerialReportWireless
Enable/disable sending wireless package exchange reports to the Serial output.
bool SerialReportMemory
Enable/disable reporting the remaining free memory to the Serial output.
bool SerialReportJSONFriendly
Enable/disable sending Text formatted reports to the Serial output.
SoundSettings(uint8_t Pin=0)
< PHSensor default settings
uint8_t PowerPin
TDS sensor A pin.
uint8_t Pin
TDS sensor A pin.
TDSSensorSettings(uint8_t Pin=0, uint8_t PowerPin=0)
< WaterTempSensor default settings
uint8_t Pin
DS18B20 sensor yellow signal wire.
WaterTempSensorSettings(uint8_t Pin=0)
< WeightSensor default settings
uint8_t DTPin
Weight sensor DT pin.
WeightSensorSettings(uint8_t DTPin=0, uint8_t SCKPin=0, long Offset=0, float Scale=0.0)