PlatformIO Community

How to get large amount of data back from microcontroller

I’m working with ESP32 and RP2040. The microcontroller acquires a large amount of data from the camera or other sensors. So far I was writing it to an on-board microSD card. Is there an easy way to get the data to the host system through USB bus instead? I need it only for development and debugging stage, so I don’t care about reliability, just the convenience.

Since you can write data to SD card, why can’t you write data directly to USB?

Are you trying to send it from the ESP32 or RP2040? The RP2040 is a native USB device, so if you e.g. send something out via serial in large chunks (Serial.write(pData, iLen)), it shouldn’t be half bad.

To clarify. I would like to get the data to host file system as files through USB port. What libraries you suggest I use to have the host file system visible to embedded device? I don’t want to write special code on the host side to receive serial data and store it as a file.

Both ESP32 and RP2040 are microcontrollers. It’s not clear to me which device collects, and which stores on SD, and which one you call the “host” - a Windows machine into which one of the above boards is plugged in via USB?

The host is a Linux PC, which runs PlatformIO and programs the microcontroller through USB or USB/serial converter. Microcontroller acquires the data. I can do a simple data analysis/viewing through PlatformIO Serial Monitor, but larger chunks of data are hard to analyse this way, e.g. images. I would like the microcontroller to place them in my Linux file system, instead of moving the microSD card back and forth between uC and PC, so I can analyse them with suitable tools.