Skip to content

Instantly share code, notes, and snippets.

@bryanpaluch
Last active December 10, 2015 19:08
Show Gist options
  • Select an option

  • Save bryanpaluch/4478800 to your computer and use it in GitHub Desktop.

Select an option

Save bryanpaluch/4478800 to your computer and use it in GitHub Desktop.
Simple TTL to USB serial for teensys
// This line defines a "Uart" object to access the serial port
HardwareSerial Uart = HardwareSerial();
//Teensys port D2 and next RX/TX
void setup() {
Serial.begin(9600);
Uart.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
Uart.write(Serial.read());
}
if (Uart.available() > 0) {
Serial.write(Uart.read());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment