Breadcrumbs

serial_get_count()

Features

This function reads the number of devices connected to USB to Serial.

Return

Value (port_info, device_name)

Description

count

Number of connected serial ports

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

Example

Python
count = serial_get_count() # read number of connected serial ports

for i in range(count): 
port_info, device_name = serial_get_info(i+1)
tp_popup("i={}, port ={}, dev ={}".format(i, port_info, device_name))