Serial Tx and Rx Pins
Transmitter and receiver Arduino pins for serial communication
Since R2023a
Model Configuration Pane: Hardware Implementation / Hardware board settings / Target hardware resources / Serial port properties
Description
Set the serial port transmitter and receiver pin numbers of your Arduino® board.
For every serial port, you can individually configure the baud rate and data frame configuration. However, not all Arduino boards support all serial ports. This table lists the serial ports supported by different Arduino boards. Set the Hardware board parameter in the Configuration Parameters dialog box to any one of these boards to enable the serial port.
| Arduino Boards | Supported Serial Ports |
|---|---|
| Arduino Due, Arduino Mega 2560, Arduino Mega ADK | Serial ports 0, 1, 2, and 3 |
| Arduino Leonardo, Arduino MKR WiFi 1010, Arduino MKR 1000, Arduino MKR Zero, Arduino Micro, Arduino Nano 33 BLE Sense, Arduino Nano 33 IoT, Arduino Nano RP2040 Connect, Arduino Robot Control Board, Arduino Robot Motor Board, Arduino Uno R4 Minima, Arduino Uno R4 WiFi | Serial ports 0 and 1 |
| Arduino Nano 3.0, Arduino Uno | Serial port 0 |
| ESP32-WROOM (Arduino Compatible), ESP32-WROVER (Arduino Compatible), Raspberry Pi® Pico (Arduino Compatible), Raspberry Pi Pico W (Arduino Compatible) | Serial ports 0, 1, and 2 |
| Teensy 4.0 (Arduino Compatible), Teensy 4.1 (Arduino Compatible) | Serial ports 0, 1, 2, 3, 4, 5, 6, 7, and 8 |
Settings
1 | 0–39This table lists the Arduino boards that support configuring the Tx and Rx pins for ports 0, 1, and 2.
| Supported Arduino Boards | Serial Port 0 | Serial Port 1 | Serial Port 2 | |||
|---|---|---|---|---|---|---|
| Tx Pins | Rx Pins | Tx Pins | Rx Pins | Tx Pins | Rx Pins | |
| ESP32-WROOM (Arduino Compatible), ESP32-WROVER (Arduino Compatible) | 1 (default), 0, 2-5, 12-19, 21-23, 25-27, 32-36, 39 | 3 (default), 0-2, 4-5, 12-19, 21-23, 25-27, 32-36, 39 | 33 (default), 0-5, 12-19, 21-23, 25-27, 32, 33, 34-36, 39 | 32 (default), 0-5, 12-19, 21-23, 25-27, 33-36, 39 | 17 (default), 0-5, 12-16, 19, 21-23, 25-27, 32-36, 39 | 16 (default), 0-5, 12-15, 17, 19, 21-23, 25-27, 32-36, 39 |
| Raspberry Pi Pico (Arduino Compatible), Raspberry Pi Pico W (Arduino Compatible) | USB | USB | 0 (default), 12, 16 | 1 (default), 13, 17 | 8 (default), 4 | 9 (default), 5 |
Programmatic Use
| No programmatic use is available. |
Version History
Introduced in R2023a