//
// Include _after_ encoder stuff so SERIAL_DISABLE is correctly set
//
// leave LOG_LEVEL undefined to turn off all logging
// or define as one of ERROR_LEVEL, WARNING_LEVEL, INFO_LEVEL, DEBUG_LEVEL
//
#define LOG_LEVEL DEBUG_LEVEL
#include "log.h"
void setup()
{
//
// initialize serial monitor
// NOTE: if SERIAL_DISABLE is defined, then SERIAL_xxxx calls are all no-ops
//
SERIAL_BEGIN(115200);
SERIAL_DEBUG(true);
SERIAL_PRINTLN();
LOG_INFO("Setting up...");
//
// init wifi
//
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
if (WiFi.waitForConnectResult() != WL_CONNECTED)
{
LOG_ERROR("WiFi Failed!\n");
return;
}
SERIAL_PRINT("...Wifi initialized, running on IP Address: ");
SERIAL_PRINTLN(WiFi.localIP().toString());
SERIAL_PRINT("ESP Board MAC Address: ");
SERIAL_PRINTLN(WiFi.macAddress());
[env]
src_build_flags =
-D SERIAL_DISABLE=0
-D USE_WHEEL_ENCODERS=0
-D USE_ENCODER_INTERRUPTS=0
-include arduino.h
[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
monitor_speed = 115200
lib_deps =
ESP Async WebServer
WebSockets