Hi,
I am having a problem with a very simple piece of code. I have a Leonardo and a CuteDigi RS232 shield. For debugging, I've attached the serial port to my mac and I'm looking at the output in CoolTerm.
When I write to the SerialConsole (Serial), everything is fine. However, when I write to the UART (Serial1), two bytes are written, both of which make no sense. In this example the output showing up in CoolTerm is: 01 1F. For the life of me I cannot figure out what is going on.
Any ideas?
Thanks,
Carl
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
char char_a = 'a';
Serial.write(char_a); delay(100);
Serial1.write(char_a); delay(100);
}