mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 08:16:08 +00:00
receiver
This commit is contained in:
@@ -16,3 +16,18 @@
|
|||||||
/*
|
/*
|
||||||
This program uses ESPNOW for receiving joystick x- and y- axis values from the receiving device.
|
This program uses ESPNOW for receiving joystick x- and y- axis values from the receiving device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "nvs_flash.h"
|
||||||
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
void app_main(void) {
|
||||||
|
|
||||||
|
// Initialize NVS
|
||||||
|
esp_err_t ret = nvs_flash_init();
|
||||||
|
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||||
|
ESP_ERROR_CHECK( nvs_flash_erase() );
|
||||||
|
ret = nvs_flash_init();
|
||||||
|
}
|
||||||
|
ESP_ERROR_CHECK( ret );
|
||||||
|
}
|
Reference in New Issue
Block a user