Sn3akyP3t3
New member
I'm new to Teensy. I came to this platform out of need of additional hardware serial connections due to limitations of Arduino while keeping a small profile. I figured that HW Serial on Teensy should work out of box, but I'm not getting that experience at all! I'm seeing USB serial just fine, but nothing seems to be flowing to or from anything Serial1 through Serial6. I'm using Teensy 3.2. Help appreciated.
I've stripped out any complexity and working with PC USB using Teensyduino straight to the Teensy via a micro USB cable. My computer is running Windows 10. Arduino version is 1.8.6. I've tried running the example code, with minor refactored changes, from https://www.pjrc.com/teensy/td_uart.html and didn't see any output from UART. I modified the code slightly to the current version I'm testing with.
I think it should be passing data from USB Serial to HW Serial and then printing out USB Serial. I'm not sure yet if I should be able to see in the Serial monitor anything from HW Serial. I don't fully understand what HW Serial is capable of. This is the modified code:
This was my Arduino settings used to upload and view via serial monitor:
This was the input/output via the Arduino serial monitor:
I expected to see data in the serial monitor containing "UART received:".
I've stripped out any complexity and working with PC USB using Teensyduino straight to the Teensy via a micro USB cable. My computer is running Windows 10. Arduino version is 1.8.6. I've tried running the example code, with minor refactored changes, from https://www.pjrc.com/teensy/td_uart.html and didn't see any output from UART. I modified the code slightly to the current version I'm testing with.
I think it should be passing data from USB Serial to HW Serial and then printing out USB Serial. I'm not sure yet if I should be able to see in the Serial monitor anything from HW Serial. I don't fully understand what HW Serial is capable of. This is the modified code:
Code:
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
byte incomingByte;
if (Serial.available() > 0)
{
incomingByte = Serial.read();
Serial.print("USB received: ");
Serial.println(incomingByte, DEC);
Serial1.write(incomingByte);
}
if (Serial1.available() > 0)
{
incomingByte = Serial1.read();
Serial.print("UART received: ");
Serial.println(incomingByte, DEC);
}
}
This was my Arduino settings used to upload and view via serial monitor:
This was the input/output via the Arduino serial monitor:
I expected to see data in the serial monitor containing "UART received:".