To use UART Serial only to communicate with the upper computer without usb cable

Status
Not open for further replies.

marklee56826

New member
Hi,
I am a beginner. I just bought a teensy board 3.6 and got started with plugging Teensy in a raspberry Pi using a USB cable and programming in Arduino IDE and running a sketch to check temperature as the tutorial says. Everything seems OK.
My question is:
Could I run the program without USB cable? As far as I know that both T3.6 and Pi have the same output 3.3v with TX and RX port. I want to hook up like the following:
Teensy Pi
3.3V 3.3V
GND GND
TX RX
RX TX
Is it OK? Please tell me how to use UART Serial only without usb cable.
Thanks,
Mark
 
Yes you can communicate with hardware serial. The T3.6 has several hardware serial ports, you can choose from. Example Serial1 on pins 0 and 1.

On teensy side, you would do things like Serial1.begin(115200);
Or whatever baud rate you choose.

Then you can do things like Serial1.println(“hello world”);

Warning typing on iPad so wrong type of quotes...

As for RPI, you need to configure it...
 
Yes, Teensy does not need USB to run your program.

But you do need USB to load your program into Teensy's flash memory. USB also comes in very handy for troubleshooting, to rapidly print messages to figure out what your program is actually doing.

Once loaded, the program will run without USB. Just make sure you don't leave anything like "while (!Serial) ;" in the code if you start from any of the examples.
 
Status
Not open for further replies.
Back
Top