Send files from Arduino, via wifi

Hi there!

I'm new in arduino world and i'm working in a small project. This project is about colect data from some sensors, store in memory and then try to work that data from my computer.
Because there will be a lot of data, i will need to have a way to send that data (a text file "file.txt") via wifi from my arduino (i got a wemos D1 mini pro with 16MB) to my NAS or computer. I think FTP could be a way to do it, but could be other way. I just need to do this everyday to delete data from memory and have again space to colect more data.

Hope you can help me on that files transfers!

Have you considered using an sd-card to store the data as this would be much easier to do and it would probably have space for many days worth of data storage?

Failing that an easy way would be have it serving a web page which simply displays all collected data which you can then access on your PC, copy/paste the data from the web browser.
Then have another web page which when accessed clears all stored data and starts collecting again
see example of serving simple web pages here: BasicWebserver/VeryBasicWebserver.ino at master · alanesq/BasicWebserver · GitHub

It is possible to FTP if you need it to be fully automated but this would get a bit more involved. You would I think need to set up Spiffs and store the data in there as a text file then use an FTP library to periodically transfer it to your PC

When I need to send data between my Wemos devices and any other computer, I prefer MQTT over WiFi. This would let you send the data to the PC in real time.

alanesq:
Have you considered using an sd-card to store the data as this would be much easier to do and it would probably have space for many days worth of data storage?

Failing that an easy way would be have it serving a web page which simply displays all collected data which you can then access on your PC, copy/paste the data from the web browser.
Then have another web page which when accessed clears all stored data and starts collecting again
see example of serving simple web pages here: BasicWebserver/VeryBasicWebserver.ino at master · alanesq/BasicWebserver · GitHub

It is possible to FTP if you need it to be fully automated but this would get a bit more involved. You would I think need to set up Spiffs and store the data in there as a text file then use an FTP library to periodically transfer it to your PC

Hi!
I’m not consider using a SD card, because i’ll need to write a lot of information, and could have some error and corrupt all data.
My project will have colecting data every 250ms in worst cases, and write in memory that information in a text file (i thinks is the easiest way). Because the amount of data, i need to have some “automatic” way to trasnfer that data/file to my PC or NAS and erase that data from SPIFFS to have again more space to start over.

OK, and if i use a SD Card to store my information instead try to send by FTP? It is possible to copy a .txt file from SPIFFS to a SD Card?

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