Python Language Python Serial Communication (pyserial)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • ser.read(size=1)

  • ser.readline()

  • ser.write()

Parameters

parameterdetails
portDevice name e.g. /dev/ttyUSB0 on GNU/Linux or COM3 on Windows.
baudratebaudrate type: int default: 9600 standard values: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200

Remarks

For more details check out pyserial documentation



Got any Python Language Question?