Class SerialDevice

java.lang.Object
com.diozero.api.SerialDevice
All Implemented Interfaces:
DeviceInterface, SerialConstants, SerialDeviceInterface, AutoCloseable

public class SerialDevice
extends Object
implements SerialConstants, SerialDeviceInterface
Serial device. The SerialDevice represents serial devices connected via USB or via the serial RX/TX pins on the GPIO header.

On the Raspberry Pi, to use the serial RX/TX pins on the GPIO header, the serial interface must be enabled and the login shell must be disabled. The device file name for the serial RX/TX pins is /dev/serial0. See Raspberry Pi UART configuration for additional detail.