21 SerialError.printf(
"UNDEFINED: stepperModule_processClientCmd: %c\n", cmd);
44 ESP_ERROR_CHECK(nvs_flash_erase());
53#ifdef TRY_NEW_SERIAL_WAIT
56 Serial.println(
"ESP_IOT Startup");
69 SerialInfo.println(
"******************");
70 SerialMin.println(VERSION);
73 SerialDebug.print(
"Compiled ");
74 SerialDebug.print(__DATE__);
75 SerialDebug.print(
" @ ");
76 SerialDebug.println(__TIME__);
90 SerialInfo.println(
"******************");
95#ifdef USE_SPIFF_MODULE
109#ifdef USE_BUTTON_MODULE
116#ifdef USE_AUDIO_MODULE
120#ifdef USE_STEPPER_MODULE
124#ifdef FEED_ON_STARTUP
129 SerialDebug.println(
"stopMotor ..");
141 SerialDebug.println(
"Starting PetTutor_Server");
142 SerialDebug.printf(
"M5STACK VERSION = %s\n", M5STACK_VERSION);
172 boolean useBLEServer =
true;
191 SerialDebug.println(
"done setupBLEServerNetworking");
231 SerialDebug.print(
"From WIFI -> JSON = ");
232 SerialDebug.println(jsonOutputString);
241 SerialDebug.println(
"calling .. processJSONMessage");
262 SerialDebug.print(
"DeviceName: ");
263 SerialDebug.println(deviceName);
269#ifdef USE_REST_MESSAGING
270 setupSecureRESTCall();
275#ifdef USE_CAMERA_MODULE_x
276 setup_CameraModule();
288#ifdef USE_REST_MESSAGING
305#ifdef USE_AUDIO_MODULE
311#ifdef USE_CAMERA_MODULE_x
324 SerialDebug.println(
"doneWIFI_APModuleCredentials, and now calling finishSetup()");
340#ifdef USE_STEPPER_MODULE
366 boolean useBLEServer =
true;
void loop_AudioModule()
called for the loop() of this plugin
void loop_BLEClientNetworking()
the loop()
void setup_BLEClientNetworking(char *serviceName, char *serviceUUID, char *characteristicUUID)
the setup() and loop() passing the serviceName to look for..
void loop_BLEServerNetworking()
the 'loop' for this module BLEServerNetworking.
void setup_BLEServerNetworking(char *serviceName, char *deviceName, char *serviceUUID, char *characteristicUUID)
the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more...
#define BLE_SERVER_CALLBACK_STATUS_MESSAGE
used to send a string message back (which might be sent to MQTT for example)
#define BLE_SERVER_CALLBACK_ONWRITE
void loop_displayModule()
called for the loop() of this plugin
void setup_displayModule()
for types: String, boolean ..
boolean _finishSetupCalledAlready
#define LED
defines.h defines the #ifdef USE_MODULE statements, as they are included elsewhere....
void stepperModule_ProcessClientCmd(char cmd)
void finishSetup()
called to finsh the setup.. this is because the MQTT and WIFI aren't run if in AP mode....
void loop()
main loop() of the Arduino runtime
void setup_MQTTNetworking()
setup the MQTT part of networking
void loop_MQTTNetworking()
called for the loop() of this plugin
boolean processJSONMessageMQTT(char *ascii, char *topic)
process the JSON message (looking for FEED, etc). Note: topic can be nil, or if not,...
char * getDeviceNameMQTT()
called for things like the advertisement
#define MQTT_CLEAN_SSID_EPROM
#define MQTT_CALLBACK_BLINK
#define MQTT_CALLBACK_FEED
8.16.25 MQTT
#define MQTT_CALLBACK_SOLID_LIGHT
#define MQTT_CALLBACK_TILT_MOTION_DETECTED
#define CALLBACKS_MQTT
8.16.25 MQTT
void cleanSSID_EPROM_MessageCallback(char *message)
clean the SSID eprom (MQTT_CLEAN_SSID_EPROM)
void loop_mainModule()
called for the loop() of this plugin
void registerCallbackMain(int callbacksModuleId, int callbackType, void(*callback)(char *))
register the callback based on the callbackType. use the callbacksModuleId for which one....
#define CALLBACKS_BLE_SERVER
void onStatusMessageBLEServerCallback(char *message)
The callback for "status messages" of the bluetooth.
void solidLightOnOff(boolean onOff)
callback for SOLID blinking led
void setup_mainModule()
called from the setup()
boolean stopAllProcesses_mainModule()
if stopped
void initAsyncCallFlags()
initialize the async call flags (with and without parameters)
void registerPinUse_mainModule(long pin, String pinName, String moduleName, boolean isI2C)
void solidLightMessageCallback(char *message)
callback for SOLID blinking led
void stopMotor_mainModule()
added 9.29.22 to support wildcards #196
void feedMessageCallback(char *message)
void setup_Sensors_mainModule()
1.22.24 setup of buttons
void invokeAsyncCommands()
checks if any async commands are in 'dispatch' mode, and if so, invokes them, and sets their flag to ...
void onWriteBLEServerCallback(char *message)
The callback for "onWrite" of the bluetooth "onWrite'.
void loop_Sensors_mainModule()
1.22.24 add setup and loop at main so it can call appropriate plugs
void blinkMessageCallback(char *message)
callback for blinking led
void main_printModuleConfiguration()
void singleClickTouched(char *whichButton)
#define CALLBACKS_BUTTON_MODULE
#define PT_CHARACTERISTIC_UUID
boolean getPreferenceBoolean_mainModule(int preferenceID)
called to set a preference (which will be an identifier and a string, which can be converted to a num...
#define PREFERENCE_MAIN_BLE_SERVER_VALUE
void println_SPIFFModule_JSON(char *attribute, char *value)
4.4.24 output a line in JSON format adding timestamp as well
void setup_SPIFFModule()
the setup for this module
void loop_StepperModule()
the main loop fro the StepperModule. This used be called FeederStateMachine()
void setup_StepperModule()
called on setup()
void setup_UIModule()
UIModule
String WIFI_APModule_JsonOutputString()
retrieves the JSON string
void loop_WIFI_APModule()
main loop
void setup_WIFI_APModule()
sets the config in the EPPROM called wifi-config. NOTE: the _done isn't valid until after this code....
void WIFI_APModule_ResetCredentials()
resets the credentials
boolean doneWIFI_APModule_Credentials()
called to see if the WIFIModule has finished bootstrapping..
void preSetup_WIFI_APModule()