--- title: "system.serial.writeBytes" description: "Write a List[Byte] to a serial port." --- # system.serial.writeBytes > Write a List[Byte] to a serial port. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.serial.writeBytes(port, toWrite)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String| `port` | The previously configured serial port to use. List[Byte]| `toWrite` | The List[Byte] to write. ### Returns Nothing ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Code Snippet" # This example will write a list of bytes to a port called "COM1" port = "COM1" toWrite = [1,1,0,0,1] system.serial.writeBytes(port,toWrite) ```