8 #ifndef MAIN_EXAMPLES_WIFI_CONN_ANIM_HPP_
9 #define MAIN_EXAMPLES_WIFI_CONN_ANIM_HPP_
12 #include "sdkconfig.h"
15 #include <ESPectro32_Board.h>
17 #include <WiFiManager.h>
20 #include <ESPectro32_LedMatrix_Animation.h>
24 static const uint8_t PROGMEM LED_MATRIX_WIFI_1[] =
34 static const uint8_t PROGMEM LED_MATRIX_WIFI_2[] =
44 static const uint8_t PROGMEM LED_MATRIX_WIFI_3[] =
54 static void load_ex_wifi_conn_anim() {
56 ledMatrixAnim.setLedMatrix(ESPectro32.
LedMatrix());
57 ledMatrixTextAnim.setLedMatrix(ESPectro32.
LedMatrix());
59 ledMatrixAnim.addFrameWithData((uint8_t*)LED_MATRIX_WIFI_1);
60 ledMatrixAnim.addFrameWithData((uint8_t*)LED_MATRIX_WIFI_2);
61 ledMatrixAnim.addFrameWithData((uint8_t*)LED_MATRIX_WIFI_3);
66 ledMatrixAnim.start(1800,
true);
68 wifiMgr.onWiFiConnected([](
bool newConn) {
69 ESP_LOGI(
"WIFI",
"IP: %s", wifiMgr.getStationIpAddress().c_str());
72 wifiMgr.
begin(WIFI_MODE_STA,
true);
82 ledMatrixTextAnim.onAnimationCompleted([]() {
87 ledMatrixTextAnim.scrollText(wifiMgr.getStationIpAddress().c_str(), 5000);
Base class of Led Matrix animation.
Definition: ESPectro32_LedMatrix_Animation.h:28
esp_err_t begin(wifi_mode_t mode=WIFI_MODE_STA, bool autoConnect=true)
Definition: WiFiManager.cpp:112
WiFiManager class.
Definition: WiFiManager.h:45
bool waitForConnection()
Definition: WiFiManager.cpp:326
Definition: ESPectro32_LedMatrix_Animation.h:69
ESPectro32_LedMatrix & LedMatrix()
Get Led Matrix object.
Definition: ESPectro32_Board.cpp:149
The class represents Led Matrix.
Definition: ESPectro32_LedMatrix.h:76
void start(void *taskData=nullptr)
Start an instance of the task.
Definition: Task.cpp:70