ESP32 Sketch Data Upload

Why when use ESP32 Sketch Data Upload in each time the old code is executed?
where the new code and new modifications are not implemented!!
for example this is my code : any change on this code I didn't see the update on serial monitor where the old execution is show in serial monitor.

#include "SPIFFS.h"

using namespace std;

int n=100;
void setup() {
 float *data=(float*)malloc(nbEle*sizeof(float));
   Serial.begin(115200);
   if(!SPIFFS.begin(true)){
        Serial.println("An Error has occurred while mounting SPIFFS");
        return;
   }
    File file2 = SPIFFS.open("/out.txt");
    if(!file2){
        Serial.println("Failed to open file for reading");
        return;
    }
    Serial.println("File Content:");
    while(file2.available()){
       for (int i = 0; i <= 5; i++) {
       data[i] = file.parseFloat();
        Serial.println(data[i]);
    }
    file2.close();
} 
void loop() {}

Please give us a more details and an example of the problem

Ok!

If you upload blink, what happens.

The data upload ONLY uploads the files from the "data" sub-folder of the sketch folder to the SPIFFS or LittleFS filesystem of the ESP32. It DOES NOT upload new firmware. The firmware upload, if needed, should be done first, before the data upload.

It work fine and any other code work in correct way just with ESP32 Sketch Data Upload it show the old run !!!

I dealt with the files before and they were working properly but I don't know what is happening now

YES thanks :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.