Learning Examples | Foundations | Hacking | Links
Examples > Communication
Sometimes, one serial port just isn't enough! When trying to communicate with multiple serial enabled devices, while also sending info back to the main serial window, a few extra RX/TX ports can be a welcomed thing. This example makes use of one of Arduino Mega's 3 auxiliary serial ports, routing any incoming data read on that connection straight to the main TX line, and, in turn, to the main serial window for you to view.
After checking the data sheet of whatever serial enabled device you choose to use for this example, make sure that it is both properly wired and powered. Connect the RX pin and TX pins of your device to the TX and RX pins of your Mega, as shown in the schematic below.
Make sure that your Mega is connected to your computer, via USB, to enable serial communication.
image developed using Fritzing. For more circuit examples, see the Fritzing project page
serial.begin()
serial.read()
serial.available()
if()