You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some way I can open a port (i.e. "/dev/ttyACM0") "safely"? Alternatively, test to see if a port is already open? Currently I can only do:
isopen(sp)
but this only works for a SerialPort type, that has already been opened before (and maybe closed at some point). My point is, if you don't know what ports are available, open, or closed, you can only start from get_port_list(), which gives you a list of strings. How can I, from that point, safely test if a port is already open, so I'll know to close it before attempting to open it again?
The text was updated successfully, but these errors were encountered:
Is there some way I can open a port (i.e.
"/dev/ttyACM0"
) "safely"? Alternatively, test to see if a port is already open? Currently I can only do:isopen(sp)
but this only works for a
SerialPort
type, that has already been opened before (and maybe closed at some point). My point is, if you don't know what ports are available, open, or closed, you can only start fromget_port_list()
, which gives you a list of strings. How can I, from that point, safely test if a port is already open, so I'll know to close it before attempting to open it again?The text was updated successfully, but these errors were encountered: