ESP_IOT v2.5
IOT ESP Coding
main.cpp File Reference
#include "../Defines.h"
#include "nvs_flash.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Macros

#define LED   2
 defines.h defines the #ifdef USE_MODULE statements, as they are included elsewhere.. Don't define them here. More...
 

Functions

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.. More...
 
void mainSetup ()
 
void mainLoop ()
 main loop() of the Arduino runtime More...
 

Variables

boolean _finishSetupCalledAlready = false
 

Macro Definition Documentation

◆ LED

#define LED   2

defines.h defines the #ifdef USE_MODULE statements, as they are included elsewhere.. Don't define them here.

TRICK: has to compile with Arduino .. and the loop() is in .ino file MUST: define PLATFORM_IO (or not)

Definition at line 26 of file main.cpp.

Function Documentation

◆ finishSetup()

void finishSetup ( )

called to finsh the setup.. this is because the MQTT and WIFI aren't run if in AP mode..

8.16.25 WIFI AP

8.16.25 MQTT

8.16.25 WIFI AP

8.16.25 WIFI AP

try a call.. NOTE, if the WIFI isn't working, this won't work either..

1.20.24 setup the camera after the WIFI is working .. 8.16.25 do this now with the OO module in main..

Definition at line 246 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainLoop()

void mainLoop ( )

main loop() of the Arduino runtime

defines.h defines the #ifdef USE_MODULE statements, as they are included elsewhere.. Don't define them here.

try a call..

4.17.22

8.16.25 TODO: change these loops to the M5Sensor plugin model..

8.16.25 do this now with the OO module in main..

8.16.25 WIFI AP

called to check if any Async Commands are in dispatch mode

note: displayModule() musts be called before buttonModule (as the "model" is updated (initiated) in the display module called for the loop() of this plugin (this is almost the "frames" of the graphic, as fast as the runtime can make this loop! FAST.. 24 fps ??

loop on the buttons

Do your thing here, this just spams notifications to all connected clients

8.16.25 BLE CLIENT

8.16.25 WIFI AP

8.16.25 MQTT

8.16.25 BLE SERVER if the BLE_SERVER is turned on..

old ESP32 didn't have the "server" turned on..

8.16.25 WIFI AP

doneWIFI_APModuleCredentials

8.16.25 WIFI AP

Definition at line 314 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainSetup()

void mainSetup ( )

note: setup only called one time... so, the first time the doneWIFIModuleCredentials is set.. call setup() main setup

start begin here

https://forum.arduino.cc/t/do-i-really-need-while-serial/1183292/16 trying to get the debug to printout always, not just on REBOOT

added 8.29.23 .. figure if this is right! 9.25.23 .. took out .. might be cause of crash..

5.3.25 register our PIN use

called for the loop() of this plugin

4.17.22 MainModule does all the preferences, etc.. ***** MUST BE CALLED BEFORE CODE BELOW..

8.17.25 register when SSID completed

SPIFF must be after main_setup() since it reads preferences .. is first so debug can be saved

2.4.24 (2.4.68 lisa birthday). Mine 2.5.58 tomorrow The setup_Buttons_mainModule() is really a setup_Sensors so take away the #ifdef

12.8.22 add audio

8.16.25 MQTT

8.16.25 WIFI AP

8.16.25 BLE SERVER

if the BLE_SERVER is turned on..

8.16.25 MQTT

10.10.25 #405 #406 see if the device is a PTClicker if the M5Atom class is one..

8.16.25 BLE CLIENT

Definition at line 54 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stepperModule_ProcessClientCmd()

void stepperModule_ProcessClientCmd ( char  cmd)

Definition at line 31 of file main.cpp.

Variable Documentation

◆ _finishSetupCalledAlready

boolean _finishSetupCalledAlready = false

Definition at line 41 of file main.cpp.