Is there a way to write the null character to a serial stream. I tried both print and write with char or unsigned char but none of the combinations actually writes the null character. In fact if I do
case GETMODEBYTE:
Serial.print('s');
Serial.print('t');
Serial.print('m');
Serial.write(0x00);
Serial.write(0x01);
Serial.write(0x02);
The output on the other end of the serial connection would be:
The program is a serial monitor, it spies on an already open serial port. The port is opened by the arduino serial monitor. The before last column displays the hex values
Anyway, normally I send the data with a bluegiga chip to my android phone, so my hope is that java(android) will be able to interpret the null character correctly, otherwise I'll have to adjust my protocol