12static const uint8_t
Version = 9;
21static const uint8_t MovingAverageDepth = 10;
45 struct AeroponicsModuleSettings
47 bool SerialReportDate;
48 bool SerialReportMemory;
49 bool SerialReportJSONFriendly;
50 bool SerialReportJSON;
51 bool SerialReportWireless;
53 struct AeroponicsModuleSettings Aero1 = {.SerialReportDate =
false, .SerialReportMemory =
false, .SerialReportJSONFriendly =
false, .SerialReportJSON =
false, .SerialReportWireless =
true};
55 struct AeroponicsSettings
65 struct PressureSensorSettings
71 struct PressureSensorSettings Pres1 = {.Pin = A7, .Offset = 0.57, .Ratio = 2.7};
78 struct SoundSettings Sound1 = {.Pin = 2, .Enabled =
true};
80 struct PressurePumpSettings
83 bool PumpPinNegativeLogic;
84 uint8_t BypassSolenoidPin;
85 bool BypassSolenoidNegativeLogic;
86 uint16_t BypassSolenoidMaxOpenTime;
87 uint16_t BypassSolenoidClosingDelay;
90 uint8_t SpeedLimitLow;
91 uint8_t SpeedLimitHigh;
96 struct PressurePumpSettings AeroPump1 = {.PumpPin = 3, .PumpPinNegativeLogic =
false, .BypassSolenoidPin = 4, .BypassSolenoidNegativeLogic =
true, .BypassSolenoidMaxOpenTime = 180, .BypassSolenoidClosingDelay = 600, .PumpEnabled =
true, .Speed = 100, .SpeedLimitLow = 30, .SpeedLimitHigh = 100, .PumpTimeOut = 420, .PrimingTime = 10, .BlowOffTime = 3};
98 struct WeightSensorSettings
105 struct WeightSensorSettings Weight1 = {.DTPin = A0, .SCKPin = A1, .Offset = 19793, .Scale = -22280.70};
107 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....
< Aeroponics_Tank default settings
int NightInterval
Spray every X minutes - When the lights are OFF.
int DayInterval
Spray every X minutes - When the lights are ON.
bool SprayEnabled
Enable/disable spraying cycle.