Serial Transmit
Transmit data over Arduino serial port
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Common
Description
Use the Serial Transmit block to transmit a Nx1 array of data of variable length over the Arduino® serial port to the serial device.
During simulations without the hardware, this block does not transmit the data. If you use this block in a Simulink® model that has the Standard Servo Read, Standard Servo Write, or Continuous Servo Write block, use longer sample times to avoid overruns.
Warning
Do not connect the serial port pins to an RS-232 serial interface, such as the DE-9M connector on a computer, without limiting the voltage. The RS-232 standard allows higher voltages that can damage your hardware. For more information, read the documentation for your Arduino hardware.
Note
For Arduino Uno, Mega, and Nano boards, the double data type occupies 4 bytes. For Arduino SAMD, Due, ESP32 compatible, Teensy, and Nano 33 BLE hardware boards, the double data type occupies 8 bytes.
Ports
Input
Parameters
Version History
Introduced in R2018b
See Also
Serial Receive | Install Support for Arduino Hardware | Pin Mapping for Arduino Timer Independent Blocks
Topics
- Send and Receive Serial Data Using Arduino Hardware
- Read Serial Data from GPS Shield Using Arduino Hardware
- Send and Receive Data Between Arduino and Host Using Serial Communication
- Send and Receive Data of Variable Lengths Using Arduino Serial Communication Blocks
- Use Serial Communication with Arduino Hardware