Main Content

Serial Port

Use the Raspberry Pi™’s serial port

Functions

read Read data from serial device
write Write data to serial device

Objects

raspi Connection toRaspberry Piboard
serialdev Connection to serial device onRaspberry Pihardware

Examples and How To

Use the Raspberry Pi Serial Port to Connect to a Device

This example shows how to create a connection to a serial device, write data to the device, and read data from the device.

控制一个四位数的七段Display Using Serial Port

This example shows you how to use the serial UART on Raspberry Pi hardware to control a four-digit seven-segment display.

Concepts

The Raspberry Pi Serial Port

Serial Port on Raspberry Pi Hardware

Troubleshooting

Troubleshoot the Raspberry Pi Serial Port

Troubleshoot Serial Port on Raspberry Pi Hardware

Featured Examples