I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb1kb). Afterwards I need to send the collected data to ana C# application I wrote over the serial port. I serialized my tx data into a byte buffer and simply used this code to transmit:
void sendEncoderData()
{
byte buffer[1024];
/*** some code that populates buffer ***/
int bytesToSend = 1024;
Serial.write(buffer, bytesToSend);
}
This onlyWhen I run the code, nothing seems to workget received by the C# application. In fact, I never see the Tx LED light up. However, if I change bytesToSend
isto a value smaller than 64 bytes everything works. Is this a limitation of Serial.write()
or is it something else? What are ways I can work around this limitation?
More information: sendEncoderData()
is called by an interrupt service routine. However prior to the call, I made sure to 'detachInterrupt()` on all pins including the pin associated with said ISR.
I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb). Afterwards I need to send the collected data to an application I wrote. I serialized my tx data into a byte buffer and simply used this code to transmit:
Serial.write(buffer, bytesToSend);
This only seems to work if bytesToSend
is a smaller than 64 bytes. What are ways I can work around this limitation?
I am using an Arduino Due to collect a large amount of data from an encoder (about 1kb). Afterwards I need to send the collected data to a C# application I wrote over the serial port. I serialized my tx data into a byte buffer and simply used this code to transmit:
void sendEncoderData()
{
byte buffer[1024];
/*** some code that populates buffer ***/
int bytesToSend = 1024;
Serial.write(buffer, bytesToSend);
}
When I run the code, nothing seems to get received by the C# application. In fact, I never see the Tx LED light up. However, if I change bytesToSend
to a value smaller than 64 bytes everything works. Is this a limitation of Serial.write()
or is it something else? What are ways I can work around this limitation?
More information: sendEncoderData()
is called by an interrupt service routine. However prior to the call, I made sure to 'detachInterrupt()` on all pins including the pin associated with said ISR.
- 38.9k
- 13
- 69
- 125
I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb). Afterwards I need to send the collected data to an application I wrote. I serialized my tx data into a byte buffer and simply used this code to transmit:
Serial.write(buffer, bytesToSend);
Serial.write(buffer, bytesToSend);
This only seems to work if bytesToSend
is a smaller than 64 bytes. What are ways I can work around this limitation?
I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb). Afterwards I need to send the collected data to an application I wrote. I serialized my tx data into a byte buffer and simply used this code to transmit:
Serial.write(buffer, bytesToSend);
This only seems to work if bytesToSend
is a smaller than 64 bytes. What are ways I can work around this limitation?
I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb). Afterwards I need to send the collected data to an application I wrote. I serialized my tx data into a byte buffer and simply used this code to transmit:
Serial.write(buffer, bytesToSend);
This only seems to work if bytesToSend
is a smaller than 64 bytes. What are ways I can work around this limitation?
Arduino Serial.write sending more than 64 bytes
I am using an Arduino Due to collect a large amount of data from an encoder (about 2kb). Afterwards I need to send the collected data to an application I wrote. I serialized my tx data into a byte buffer and simply used this code to transmit:
Serial.write(buffer, bytesToSend);
This only seems to work if bytesToSend
is a smaller than 64 bytes. What are ways I can work around this limitation?