I am using an Arduino Nano to read and record 5 voltages on the analog pins. I'm writing the values to a microSD card via a HiLetgo microSD module (5pcs Micro SD Carte TF Adater Reader Module,Shenzhen HiLetgo Technology Co., Ltd). Right now, the device records about 38 data points per second, and I'd like to get to about 80. It's my impression that because the default clock speed for the ATMEGA 328 is 16MHz, and the default prescale factor is 128, I could in theory be getting 9600 Hz for my sampling rate.
What is holding me back? Each time the device samples, it has to open and then close the file. Is that process lengthy, and slowing me down? Is there a way I can leave the file open, but somehow still close it when I'm done writing? I tried leaving it open and never closing it, and it didn't save anything.