Hi, I have an external device connected via serial (hardware serial on tx pin) to the Arduino and want to send c structs as byte streams over the connection. The built-in Serial.print() function fails at this as it expects arrays of ASCII-formatted chars. It won't print an array of uint8_t.
In order for this to work, I hat to add the following to Print.cpp in the Arduino Core:
Added to Print.h:
void printRaw(uint8_t b, int len);
Added to Print.cpp:
void Print::printRaw(uint8_t b, int len)
Is there any way this could be included in the nex Arduino release? I think a feature for sending byte arrays is sorely missed in the Serial.print() function.