Teensy 2.0 Serial

Status
Not open for further replies.

Hybrog

New member
Hey. I am rather new to the electronics scene, and Teensy in particular.

I am trying to send a byte of data through serial on the Teensy 2.0 to an Arduino Mega 2560. I am using Teensyduino for the programming. What I want to know is, if I want to send data to the Arduino, would I just use:

Serial1.write(0);

Would it automatically use pin 8 to transmit the data, or would I use some other obscure function? Thanks in advance.
 
You'll also need to initialize the port with Serial1.begin(9600) (using the same speed as the MEGA is set to). It will use pin 8 to Tx.

Pete
 
This may be overly obvious, but be sure to connect the grounds of both boards together. If they're plugged into the same computer, they should have the same ground though the USB cables, but it's best to have a direct ground wire between the boards.
 
Status
Not open for further replies.
Back
Top