Long time voyeur, first time poster...
I can usually find my solution by bumping my head into the wall a few time, but this time I'm stumped. I'm trying to send this Serial.write command in a while loop, but I can't figure out how to wait for a response after each line is sent. This is complete dump of data here:
// copy file to serial port
int16_t n;
uint8_t buf[7];// nothing special about 7, just a lucky number.
while ((n = myFile.read(buf, sizeof(buf))) > 0) {
for (uint8_t i = 0; i < n; i++) Serial.write(buf*) ;*
- }*
My goal is to wait for a response of 'ok' after each line in order to send the next one until they have all been sent.
Any help is greatly appreciated!