Skip to main content
added 33 characters in body
Source Link
jfpoilpret
  • 9.2k
  • 7
  • 38
  • 54

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()SD.write().

Instead:

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

while(<yourCondition){

//for each loop, it is going to make a handshake
while(<yourCondition>){
    SD.write(<yourValue>);
}

}

Do:

char buf[length]

while(yourCondition){

char buf[length];
while(yourCondition){
    buf[index] = yourValue;
}
SD.write(buf,index);//only one handshake

}

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

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

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.

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 bytes, and the second one using a buffer with 128 (buf[128]) I got 145408 bytes in my project. Good enough.

Source Link

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.