44 struct HempyModuleSettings
71 struct SoundSettings Sound1 = {.Pin = 2, .Enabled =
true};
83 struct WaterPumpSettings HempyPump1 = {.
PumpPin = 3, .PumpPinNegativeLogic =
false, .PumpEnabled =
true, .PumpTimeOut = 120, .Speed = 100, .SpeedLimitLow = 30, .SpeedLimitHigh = 100};
84 struct WaterPumpSettings HempyPump2 = {.
PumpPin = 5, .PumpPinNegativeLogic =
false, .PumpEnabled =
true, .PumpTimeOut = 120, .Speed = 100, .SpeedLimitLow = 30, .SpeedLimitHigh = 100};
96 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....
< HempyBucket default settings
float WateringIncrement
How much water to pump in one cycle, then wait for DrainWaitTime seconds before either starting a new...
float DrainTargetWeight
(kg/lbs) Amount of water that should go to the waste reservoir after a watering cycle
float MaxWeight
Waste reservoir full weight -> Pump gets disabled if reached.
uint16_t DrainWaitTime
(sec) How long to wait after watering for the water to drain
float StartWeight
(kg/lbs) When the module starts up start watering if Bucket weight is below this. Set to 0 to instant...
bool SerialReportJSONFriendly
Enable/disable sending Text formatted reports to the Serial output.
bool SerialReportWireless
Enable/disable sending wireless package exchange reports to the Serial output.
bool SerialReportJSON
Enable/disable sending JSON formatted reports to the Serial output.
bool SerialReportDate
Enable/disable reporting the current time to the Serial output.
bool SerialReportMemory
Enable/disable reporting the remaining free memory to the Serial output.
< WaterPump default settings
uint8_t Speed
Duty cycle of the PWM Motor speed.
bool PumpEnabled
Enable/disable pump. false= Block running the pump.
uint16_t PumpTimeOut
(Sec) Max pump run time
uint8_t SpeedLimitHigh
Duty cycle limit, does not allow raising the speed too high.
bool PumpPinNegativeLogic
true - Relay turns on to LOW signal, false - Relay turns on to HIGH signal
uint8_t PumpPin
Pump relay pin.
uint8_t SpeedLimitLow
Duty cycle limit, does not allow lowering the speed too much. Avoids stalling the motor.
< WeightSensor default settings
uint8_t DTPin
Weight sensor DT pin.
long Offset
Reading at 0 weight on the scale.
uint8_t SCKPin
Weight sensor SCK pin.