Serial Output to SD Card

I’m using blynk with an arduino mega and a w5500 ethernet card. Is there any way to record the entire serial output on the memory card?
for example, I would like that all text that is visualized in the serial monitor, is also recorded in the memory card.

It’s difficult.
These Ethernet cards can’t use the Ethernet connection and the SD card simultaneously, so you’d need to buffer the serial output, drop the Blynk connection, enable the SD card, append the buffered data to the data file on the card, disable the SD card and re-enable the Ethernet card the re-establish the Blynk connection.

Messy, but possible I guess.


@PeteKnight that is not true. you can use Ethernet and SD independently at once

I guess it depends on the hardware implementation then. The small number W5500 boards/shields I’ve tested have had separate CS pins for Ethernet and SD, but have been unable to use both simultaneously.
Maybe that was an Ethernet library issue, retaining the logic used in the W5100 library, as opposed to an actual hardware limitation?