Skip to main content
Skip table of contents

serial_close(ser)

Features

This function closes a serial communication port.

Parameters

Parameter NameData TypeDefault ValueDescription

ser

serial.Serial

-

Serial instance

Return

ValueDescription

0

Successful closing of a serial port

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

Example

PY
ser = serial_open(port="COM", baudrate=115200, bytesize=DR_EIGHTBITS, 
parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)
 
res = serial_write(ser, b"123456789")
 
serial_close(ser)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.