Main Content

setDTR

Set serial DTR pin

Description

setDTR(device,true) sets the specified serial data terminal ready (DTR) pin.

example

setDTR(device,false) resets the specified serial DTR pin.

example

Examples

collapse all

Set and then reset the serial DTR pin.

device = serialport("COM3",9600);
 ⋮
setDTR(device,true)
 ⋮
setDTR(device,false)

Input Arguments

collapse all

Serial port connection, specified as a serialport object.

Example: setDTR(device) sets the DTR pin for the serial port connection device.

Version History

Introduced in R2019b