problem with esp32 pico D4 and memory flash
Posted: Tue Nov 14, 2023 2:46 pm
I try to write to the flash memory of the esp32 pico D4 but it does not write any data, I am using the preferred library and I tried with spiffs and littlefs, but I cannot write with any, my code is here:
I am using platformio with vcode, my platformio.ini file is as follows:
[env:pico32]
platform = espressif32
board = pico32
framework = arduino
monitor_speed = 115200
I've tried this other one, but it doesn't work for me either.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
However, when I use another esp32 it works normally
Code: Select all
#include <Preferences.h>
Serial.begin(115200);
preference.begin("my-app", false);
unsigned int counter = preference.getUInt("counter", 0);
// Increase counter by 1
counter++;
// Print the counter to Serial Monitor
Serial.printf("Current counter value: %u\n", counter);
// Store the counter to the Preferences
preference.putUInt("counter", counter);
// Close the Preferences
preference.end();
// Wait 10 seconds
Serial.println("Restarting in 10 seconds...");
delay(10000);
// Restart ESP
ESP.restart();
[env:pico32]
platform = espressif32
board = pico32
framework = arduino
monitor_speed = 115200
I've tried this other one, but it doesn't work for me either.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
However, when I use another esp32 it works normally