15#include "StaticThreadController.h"
20#include "src/Modules/AeroModule_Tank.h"
21#include "src/WirelessCommands_Aero.h"
51 logToSerials(F(
"Aeroponics module initializing"),
true, 0);
54 struct AeroModuleCommand BlankCommand = {AeroMessages::AeroModuleCommand1};
55 memcpy(
ReceivedMessage, &BlankCommand,
sizeof(
struct AeroModuleCommand));
57 setSyncInterval(3600);
118 AeroMod1->processTimeCriticalStuff();
143 static bool ledStatus;
144 ledStatus = !ledStatus;
145 digitalWrite(LED_BUILTIN, ledStatus);
155 if (timeStatus() != timeSet && ((AeroCommonTemplate *)
ReceivedMessage)->SequenceID == AeroMessages::AeroModuleCommand1)
183 if (ReceivedTime > 0)
185 setTime(ReceivedTime);
void logToSerials(const __FlashStringHelper *ToPrint, bool BreakLine, uint8_t Indent)
< Logging
Settings * loadSettings(bool ResetEEPROM)
Load settings from EEPROM.
RF24 Wireless(WirelessCEPin, WirelessCSNPin)
Initialize the NRF24L01 wireless chip (CE, CSN pins are hard wired on the Arduino Nano RF)
char CurrentTime[MaxWordLength]
Buffer for storing current time in text format.
char LongMessage[MaxLongTextLength]
Temp storage for assembling long messages (REST API, MQTT reporting)
void processTimeCriticalStuff()
uint32_t ReceivedMessageTimestamp
Thread TimeCriticalThread
char ShortMessage[MaxShotTextLength]
Temp storage for assembling short text messages (Log entries, Error messages,etc)
void InitializeWireless()
Settings * ModuleSettings
AeroModule * AeroMod1
Represents a Aeroponics tote with solenoid,pressure pump..etc.
HardwareSerial & ArduinoSerial
< Component initialization
void heartBeat()
Wireless communication.
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 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....
struct AeroponicsModuleSettings Aero1
bool Metric
Switch between Imperial/Metric units. If changed update the default temp and pressure values below to...
bool Debug
Logs debug messages to serial and web outputs.