Skip to main content
added 162 characters in body
Source Link
Espen
  • 103
  • 3

Is it possible to program a custom description so that my python program can know exactly what USB port to connect to for that specific Arduino boardprogramming?

It should be able to find any board with that program so the best approach is if a custom description can be programmed with the active program being uploaded.

I want to make sure my setup can handle multiple Arduino boards and always know what USB to use for each specific use.

This finds a general Arduino device:

for port in serial.tools.list_ports.comports():
    if "Arduino" in port.description:
        print "Arduino device!"

But I want something like this:

for port in serial.tools.list_ports.comports():
    if "proximity_sensor" in port.description:
        print "My specific Arduino deviceprogram!"

Is it possible to program a custom description so that my python program can know exactly what USB port to connect to for that specific Arduino board?

I want to make sure my setup can handle multiple Arduino boards and always know what USB to use for each specific use.

This finds a general Arduino device:

for port in serial.tools.list_ports.comports():
    if "Arduino" in port.description:
        print "Arduino device!"

But I want something like this:

for port in serial.tools.list_ports.comports():
    if "proximity_sensor" in port.description:
        print "My specific Arduino device!"

Is it possible to program a custom description so that my python program can know exactly what USB port to connect to for that specific programming?

It should be able to find any board with that program so the best approach is if a custom description can be programmed with the active program being uploaded.

I want to make sure my setup can handle multiple Arduino boards and always know what USB to use for each specific use.

This finds a general Arduino device:

for port in serial.tools.list_ports.comports():
    if "Arduino" in port.description:
        print "Arduino device!"

But I want something like this:

for port in serial.tools.list_ports.comports():
    if "proximity_sensor" in port.description:
        print "My specific Arduino program!"
Source Link
Espen
  • 103
  • 3

Programming the serial description

Is it possible to program a custom description so that my python program can know exactly what USB port to connect to for that specific Arduino board?

I want to make sure my setup can handle multiple Arduino boards and always know what USB to use for each specific use.

This finds a general Arduino device:

for port in serial.tools.list_ports.comports():
    if "Arduino" in port.description:
        print "Arduino device!"

But I want something like this:

for port in serial.tools.list_ports.comports():
    if "proximity_sensor" in port.description:
        print "My specific Arduino device!"