I am trying to read a couple of signals using my arduino mega 2560. I need to read them at 4kHz. To do so I am using interrupts and the analogRead function.
My question is: how can I continuously send the data to a SD card? I can create a buffer and send it when is full but I don't know how to avoid data losses with the reading and writing speeds so different.
Thanks in advance