Comments on: ESP32 Datalogger: Download Data File via Web Server (Arduino IDE) https://randomnerdtutorials.com/esp32-datalogger-download-data-file/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Wed, 26 Mar 2025 10:27:03 +0000 hourly 1 https://wordpress.org/?v=6.8.1 By: Sara Santos https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-1019921 Wed, 26 Mar 2025 10:27:03 +0000 https://randomnerdtutorials.com/?p=151210#comment-1019921 In reply to Andreas Deckers.

Hi.
That’s probably not the isssue.
You should have more information about the error, not just that warning.

Can you share more info?

Regards,

Sara

]]>
By: Andreas Deckers https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-1019694 Tue, 25 Mar 2025 11:31:03 +0000 https://randomnerdtutorials.com/?p=151210#comment-1019694 Hi
the upload of the code was not successful due to the following error code:
Mehrere Bibliotheken wurden für “SD.h” gefunden
Benutzt: C:\Users\Deckers\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\SD
Nicht benutzt: C:\Users\Deckers\AppData\Local\Arduino15\libraries\SD
Nicht benutzt: C:\Users\Deckers\Documents\Arduino\libraries\SD
exit status 1

Compilation error: exit status 1

I´m sure that only one sd-card library is installed. What went wrong?

Desperately waiting for an answer
Andreas

]]>
By: john errington https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-996294 Wed, 01 Jan 2025 09:58:36 +0000 https://randomnerdtutorials.com/?p=151210#comment-996294 Sorry this is so long.
I was using the hardware on a powered usb hub.
I’ve now connected the hardware directly to a usb port on the main PC, and added a 10uF cap across the SD card supply pins (5V)
The system now seems robust.
The data.txt file is created in setup.
When the “delete file” is run I dont see how that file is re-created in your code.?

]]>
By: john errington https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-994263 Wed, 25 Dec 2024 09:12:22 +0000 https://randomnerdtutorials.com/?p=151210#comment-994263 “My best guess is that the error relates to access to the sd card.”
I’ve added this to the write, append and delete functions. connSDCard();

// Reconnect microSD card
void connSDCard(){
if(!SD.exists(dataPath)){
Serial.println(“File not accessible”);
SD.begin();
Serial.println(“Reconnected SD card “);
}
return;
}

It no longer fails after a file view: but the delete still fails :

HTTP: Deleting data file Deleting file: /data.txt
– delete failed
Saving data: Wed 25/12/2024 09:09:47, 22.5, 47.2, 1018.8
Appending to file: /data.txt
File not accessible
Reconnected SD card
Failed to open file for appending
Saving data: Wed 25/12/2024 09:10:50, 22.5, 47.2, 1018.7
Appending to file: /data.txt
File not accessible
Reconnected SD card
Failed to open file for appending

]]>
By: john errington https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-994225 Wed, 25 Dec 2024 03:40:31 +0000 https://randomnerdtutorials.com/?p=151210#comment-994225 Connecting to WiFi ……connected
192.168.1.57
SD Card Type: SDHC
SD Card Size: 3768MB
File already exists
Saving data: Wed 25/12/2024 03:15:08, 20.2, 52.0, 1016.7
Appending to file: /data.txt
Message appended
Saving data: Wed 25/12/2024 03:16:08, 20.2, 52.4, 1016.7
Appending to file: /data.txt
Message appended
Saving data: Wed 25/12/2024 03:17:08, 20.2, 52.4, 1016.7
Appending to file: /data.txt
Message appended
Saving data: Wed 25/12/2024 03:18:08, 20.2, 52.4, 1016.6
Appending to file: /data.txt
Message appended
Saving data: Wed 25/12/2024 03:19:08, 20.3, 52.4, 1016.6
Appending to file: /data.txt
Message appended (yes that shows on the sd card file)
Saving data: Wed 25/12/2024 03:20:30, 20.5, 51.8, 1016.6 (that does not)
Appending to file: /data.txt
Deleting file: /data.txt
– delete failed
Failed to open file for appending
Saving data: Wed 25/12/2024 03:21:34, 20.5, 51.7, 1016.7 (not saved)
Appending to file: /data.txt
Failed to open file for appending

The web page is now not displayed, but I can still ping the server.
On removing the sd card the delete has indeed failed.
At this point the server displays a blank page.
(now replaced the sd card)
Following a reset

Connecting to WiFi …..connected
192.168.1.57
SD Card Type: SDHC
SD Card Size: 3768MB
File already exists
Saving data: Wed 25/12/2024 03:33:19, 21.4, 50.8, 1016.7
Appending to file: /data.txt
Failed to open file for appending (web page not displayed)

Connecting to WiFi ……connected
192.168.1.57
SD Card Type: SDHC
SD Card Size: 3768MB
File already exists
Saving data: Wed 25/12/2024 03:34:41, 21.3, 50.9, 1016.7
Appending to file: /data.txt
Message appended (web page now displayed)

My best guess is that the error relates to access to the sd card.

Another issue is that the amount of data that is shown is limited.
Could it be that the data transfer is interrupted when a new reading is taken?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-994051 Tue, 24 Dec 2024 11:39:07 +0000 https://randomnerdtutorials.com/?p=151210#comment-994051 In reply to john errington.

Hi.
When that happens, do you get any errors on the Serial Monitor?
Regards,
Sara

]]>
By: john errington https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-994032 Tue, 24 Dec 2024 09:20:35 +0000 https://randomnerdtutorials.com/?p=151210#comment-994032 While the project does work well following a reset I soon find the following issues
after running for some time the web page doesnt load – or is blank
(yet I can ping the server)

and i see this
Saving data: Tue 24/12/2024 09:02:49, 21.6, 46.8, 1010.6

Appending to file: /data.txt
Failed to open file for appending

especially after the file delete option.

]]>
By: Errayn https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-982704 Tue, 12 Nov 2024 20:23:55 +0000 https://randomnerdtutorials.com/?p=151210#comment-982704 In reply to JB.

Hello Mr. JB, I ran your project. However, unlike your project, I added RTC to my system. And instead of connecting to a modem, I use esp 32 as a modem. My problem is that when I want to draw a graph from the internet browser, it draws the old data on the graph. When I clear my browser’s history, a new graph appears. I have to clear the browser history every time I want to see graphics. Is there a solution to this? Thank you very much in advance

]]>
By: Manfred https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-958472 Tue, 17 Sep 2024 11:32:52 +0000 https://randomnerdtutorials.com/?p=151210#comment-958472 Hi Sara,

a pretty nice and helpfull tutorial. But what is if someone wouldn’t use a SD-Card (with Reader) ? It is really easy to save a file to the computer who have the browser running and from there anyone cpuld save th file wherever – maybe over USB to a SD-Stick.

Can you give a sample-code snipet (or modify the given) to collect sensor-data and save this data over a separate download-button vis browser directly to the computer. I think there is extremly less code necessary to have one more save-option without SD-Card-Reader installed.

Thanks in advance,
Manfred

]]>
By: Francisco https://randomnerdtutorials.com/esp32-datalogger-download-data-file/#comment-928978 Fri, 21 Jun 2024 20:42:32 +0000 https://randomnerdtutorials.com/?p=151210#comment-928978 Hello;
I’ve just try the project and receive the message “Card Mount Failed” in serial monitor.
I used a 128GB card, and change to 32Gb and all works fine then.

I used the BMP280 sensor too, with minor changes in programming.

Connecting to WiFi ……192.168.1.48
Card Mount Failed
File doesn’t exist
Creating file…
Writing file: /data.txt
Failed to open file for writing
Saving data: 0,26.99,1013.80,95.39
Appending to file: /data.txt
Failed to open file for appending

Saving data: 1718995539,27.17,1013.84,95.09

..192.168.1.48
SD Card Type: SDHC
SD Card Size: 30436MB
File already exists
Saving data: 1719000347,27.59,1014.36,90.80

]]>