0

Is it possible to monitor multiple USB ports simultaneously in Arduino IDE while running only ONE instance of the IDE?

If not, which solutions come alternatively to mind?

  • 1
    No. It's not. It's too primitive. – Majenko Jul 18 at 20:42
  • tks. chad solved it elegantly with a python script. lightweight and easy to use. – tony gil Jul 20 at 9:09
2
+50

If you are only interested in monitoring the output, a simply python script can be run to monitor the port. This sample takes an input of the port number(assuming they get named ttyUSB1, ttyUSB2, ect... Or you can modify it to be a hard coded port. Also make sure the baud rate matches with what your arduino is running (115200 in the example)

You can then run this script in two separate terminals, one for each port

#!/usr/bin/env python3


import serial 
import sys

if len(sys.argv)<2:
    print("Please give serial port number")
    exit()
port=sys.argv[1]
ser= serial.Serial('/dev/ttyUSB'+port,115200,timeout=5)

while True:
    try:
        print(str(ser.readline().strip()))
    except:
        print(sys.exc_info())
        ser.close()
        exit()

Start the program like so

python3 ./programName.py 1 (or ./programName.py 0, etc)

The number dictates which of the ttyUSBx devices you are trying to watch (will match with what you see in the arduino IDE).

  • the port is stumping me. mind clarifying? I keep on getting Please give serial port number – tony gil Jul 19 at 9:06
  • 1
    start the program like so ./programName 1 or ./programName 0 the number dictates which of the ttyUSBx devices you are trying to watch(will match with what you see in the arduino IDE) – Chad G Jul 19 at 15:08
  • Spot on! Perfect, elegant, simple. UPVOTED, ACCEPTED & BOUNTIFIED. :) – tony gil Jul 20 at 9:04
  • 1
    @tonygil, to copy port input to output, you don't need python. the python script could monitor more ports and print them with different color – Juraj Jul 22 at 6:58
  • that is also very useful, tks @Juraj! – tony gil Jul 22 at 19:16
2

You can run multiple instances of the Arduino IDE to work with multiple boards at the same time. Start IDE second time with Start menu or desktop shortcut.

Of course you can monitor the COM/tty port with a common serial terminal program too.

  • UPVOTED because it addresses the root problem of monitoring multiple boards. NOT ACCEPTED becacuse the solution needed depended on one and only one instance of IDE. tks! – tony gil Jul 19 at 8:52
1

Short answer : No.

Long answer : Noooooooooooooooooooooooooooooooooooooo, since one window can only work with one arduino.
That being said, if you open another file, or create new file (Ctrl + N) on existing window, it doesn't make another process.
It is still on the only javaw.exe process running on your computer (you kill that, both window gone for good.)

To make it simple :

  • Double click Arduino icon on your desktop, and double click it again, it will run as 2 separate process.
  • Double click Arduino icon on your desktop, and then use open file or new file, it won't make another process.

But I think I misunderstood your question. If you're asking for arduinos in multiple USB ports, yeah, one IDE can see wherever you plug it in.

  • Tried your suggestion: 2 windows - 1 process. Ubuntu creates a second process, unfortunately. – tony gil Jul 18 at 20:49
1

Sloeber, an open source IDE based on Eclipse on which I am a proud contributor, does have this feature, but the Arduino IDE does not.

  • 1
    I use Sloeber. It is a very good integration of Arduino build tools and packages into Eclipse – Juraj Jul 19 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.