Skip to content

Commit

Permalink
Update Wippersnapper_demo.ino - add coredump for esp32
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth authored Oct 2, 2024
1 parent fe5f4d2 commit 5e508a2
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions examples/Wippersnapper_demo/Wippersnapper_demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,39 @@
//
// All text above must be included in any redistribution.

#ifdef ARCH_ESP32
#include "esp_core_dump.h"
#endif

#include "Wippersnapper_Networking.h"
Wippersnapper_WiFi wipper;

// Enable debug output for beta builds
#define WS_DEBUG

void setup() {

#ifdef ARCH_ESP32
// Configure the core dump to be saved to flash
esp_err_t err = esp_core_dump_init(ESP_CORE_DUMP_FLASH); // Specify flash as storage
#endif

// Provisioning must occur prior to serial init.
wipper.provision();

Serial.begin(115200);
Serial.begin(115200); // wippersnapper serial
//while (!Serial) delay(10);

#ifdef ARCH_ESP32
if (err != ESP_OK) {
Serial.println("Core dump init failed!");
}
#endif

wipper.connect();

}

void loop() {
wipper.run();
}
}

0 comments on commit 5e508a2

Please sign in to comment.