Skip to main content
1 of 2

Avoid the handshake getting a buffer!

Use SD.write(buf,size);

Hi every one, I'm working in a project with the same issue. I was following the same steps of yours and got exactly the same numbers. I've just fixed it out. The problem is the handshake when you call the SD.write().

Instead:

//for each loop, it is going to make a handshake

while(<yourCondition){

SD.write(<yourValue>)

}

Do:

char buf[length]

while(yourCondition){

buf[index] = yourValue;

}

SD.write(buf,index);//only one handshake

In my project the first one I got 4100 byte, and the second one using a buffer with 128 (buf[128]) I got 145408 byte in my project. Good enough.