multiple,concurrent instances of IDE ?

Hello all,
I am developing a project with currently two and eventually three Arduinos (Arduini ??) talking to each other. it would be really swell if I could have an instance of the IDE up (and serial monitor, while I'm asking) for each sketch.
Currently, if I change the board and port in one instance it changes those settings in the other, which is obviously inconvenient, especially as there will be two Pro Minis and a Due (or Zero) in the mix.

Might this be something the developers of the IDE developers could address?

Thanks in advance, and thanks for your continued dedication !

You can use other terminal programs such as PuTTY to view the content from the other Arduinos.

IMHO what you need is unlikely to be a common requirement among Arduino users so I'm not convinced it would merit developer time.

Personally I do my editing with Geany and I have written a short Python program to manage the verify and upload process.

...R

1 Like

You are not running multiple instances. You have multiple sketches loaded in one instance. The fact that the windows are separate is confusing.

Run the IDE as many times as you need using whatever mechanism is typical for your operating system (e.g. double-click the Arduino IDE icon). Load one sketch in each instance.

Robin2, I appreciate the work you've done on your solution. It isn't (I don't think, anyway) related to my problem, however.

Coding Badly, I think we may have a semantic disconnect here, so I'll try and re-word my problem.

I'm developing two sketches that will talk to each other via the I2C protocol and ports on two Arduino variants; one is a Pro Micro, the other a Mega2650, for what difference it makes. Obviously I want to keep two windows up with the two sketches and two boards up at the same time.

I open up an instance of the IDE with sketch A, on board type A, connected via USB serial port A. I build and upload the sketch successfully.

I then open up what I'm referring to as a second instance of the IDE (i.e. a second window) with sketch B, board type B, connected via USB serial port B. I build and upload the sketch successfully.

I now go back to window A, sketch A, board A, port A, only to find out that window A thinks it's talking to a board of type B on port B. Clearly the sketch loaded in the window is sketch A, so I am at a loss as to why the IDE suddenly things it's talking to a board type B through port B.

I am at a lost to see why that could in any way be considered appropriate. Further, while this behavior persists I can only have one serial terminal window open. Efforts to open the serial monitor for the other sketch result in closure of the first monitor window.

Today, I found out that this behavior is also inconsistent: for a while, during development, the two windows kept track of their respective board types and ports, though I have no idea what I did, if anything, to induce this - what I would consider correct - behavior.

I hope this better explains my problem, and that somebody can shed some light on it.

julianop:
I now go back to window A, sketch A, board A, port A, only to find out that window A thinks it's talking to a board of type B on port B. Clearly the sketch loaded in the window is sketch A, so I am at a loss as to why the IDE suddenly things it's talking to a board type B through port B.

Because my approach includes the type of board and the port name as comments at the top of the Arduino code there can be no mix up.

But I do appreciate that my odd-ball ideas are -- odd-ball.

...R

Oh I wouldn't say that - you've introduced organization and self-documentation and successfully addressed a problem :slight_smile:

But does that solution keep the IDE in track, is my question. Right now, the IDE intermittently cannot seem to support having two distinct board/port/sketch instances open concurrently; that has nothing to do with my getting confused at all - though that happens in lots of other areas :wink:

No, the IDE intermittently insists on applying board and port information from one window (one instance, in my mind - because I can clearly see two of everything, including window frames, menus, buttons, etc., they are clearly separate) - to another. Sometimes when I bring up two windows it will keep them separate, sometimes it doesn't; I haven't yet discovered what I do - if it is anything of my doing at all - to make the IDE work properly.

To add a familiar use case by way of comparison: if I had two Word documents open in two windows, I wouldn't expect a change in font size in one window to take effect in the other; if I had two Powerpoint presentations open, I wouldn't expect a change in the default text color to take effect in the other. They are, in each case, completely separate documents. Why, then, would I consider that having two separate sketches, open concurrently, be forcibly compiled for the same board type, and ported via the same port? I can see no possible rationale for that.

I think I can be confident in calling this a bug, not a feature :slight_smile:

julianop:
Coding Badly, I think we may have a semantic disconnect here, so I'll try and re-word my problem.

What we have is you failing to follow basic instructions...

Run the IDE as many times as you need using whatever mechanism is typical for your operating system (e.g. double-click the Arduino IDE icon). Load one sketch in each instance.

julianop:
But does that solution keep the IDE in track, is my question.

There is no need to use the IDE. You could just as well use two instances of PuTTY to monitor the output.

I frequently do use the IDE Serial Monitor - though I can't remember when I last tried to monitor two Arduinos with it at the same time. Recently I have been using Minicom - but that may only work on Linux.

...R

What we have, Coding Badly, is you being unnecessarily curt, bordering on rude.

What is it in what I have described that is not exactly what you have said?

"Run the IDE as many times as you need using whatever mechanism is typical for your operating system (e.g. double-click the Arduino IDE icon). Load one sketch in each instance..

That is exactly what I'm doing.

Quit with the arrogant attitude, please.

Robin2, it's not primarily about monitoring, though that is certainly a factor. And I DO use PuTTY as a monitor, partly to circumvent this problem and partly to use VT100 codes.

Here's what happens, again.

I open window 1, Mega2560, USB port 6, let's say. I then open window 2, Pro Mini, port 7, let's say.

I do a few edits to window 1, make, and upload/run.

Leaving that window open, I make some edits in window 2, and upload/run.

The boards are talking to each other via I2C, by the way, which is why I want two windows open concurrently in the first place.

Leaving window 2 open, I go back to window 1, only to find that it now shows the Pro Mini and port 7, although it still has sketch 1 in the editor.

I correct that, go back to window 2 - the Pro Mini, leaving window 1 open - and now it shows Mega 2560 and Port 6 with sketch 2.

At all times I have had two windows open.

I hope this is clearer.

julianop:
I open window 1, Mega2560, USB port 6, let's say. I then open window 2, Pro Mini, port 7, let's say.

"Open window" can mean at least three different things; one of which involves a pane of glass. So, no, your description is not clear.

How many times did you double-click the IDE icon (start the IDE from the icon)? Once or twice? If the answer is once, you failed. Try again.

julianop:
Here's what happens, again.

I open window 1, Mega2560, USB port 6, let's say. I then open window 2, Pro Mini, port 7, let's say.

I do a few edits to window 1, make, and upload/run.

Leaving that window open, I make some edits in window 2, and upload/run.

I presume when you say "window 1" you are referring to an instance of the Arduino IDE.

The whole point about my Python program is that the editing is NOT done using the IDE. I use the Geany editor.

...R

Just out of curiosity I have just opened an instance of the IDE (1.5.6) with the blank program in it and set the board to Mega and the port to ttyS0 (I have no Arduinos connected).

Then I opened a second instance and set the board to Uno and the port to ttyS1. When I switch from one instance to the other they each retain their settings.

And just to be clear (because this is what may be causing confusion) I started two completely separate instances of the IDE from the operating system. I did NOT create a second "window" from the first instance.

...R

1 Like

Robin2:
And just to be clear (because this is what may be causing confusion) I started two completely separate instances of the IDE from the operating system. I did NOT create a second "window" from the first instance.

...R

Aha, yes, that would indeed be the problem. Opening a second window is not the same as opening the IDE a second time from the launch mechanism. I see no clear way I could have known that, however; there is no clear way of knowing that that is what one is doing, and there is no way of distinguishing between different instances once windows are open, other than the trap I fell into. Opening a sketch from the recent menu gives no indication that the new windows is tied to the one from which it was opened. I have three windows open at this moment, one opened from the other, and the third from the launcher icon, and there is no way I can identify that two of them are somehow linked.

I can see what Coding Badly was trying to tell me, but it only makes "sense" (lexically, that is: the behavioral difference is completely nonsensical to me) now I know there is a difference. I don't know how I could have known that beforehand. It is certainly not consistent with the standard practices deployed in windowing operating systems I've used over the past thirty plus years.

Thanks for making the distinction clear, Robin2.

1 Like

This doesn't seem to work for Linux. Does anyone know if it's possible to start 2 instances of IDE on a Linux?

Microk:
This doesn't seem to work for Linux.

You need to tell us in detail what you tried.

I just confirmed that my earlier advice works with Linux Mint.

...R

I have verified on Windows 10 that if I start two separate instances of the IDE, changing the PORT number on one will cause the other's PORT number to change also. One is on PORT 31, the other is on PORT 21 (one is a LoRa Sender, the other is a LoRa Receiver, so I see in the title bar). This is just plain NUTS! The only conclusion I can draw is that these are NOT two separate instances, but are sharing some underlying information. I've used the same technique to open the second instance as I use to open multiple instances of Windows explorer - I right click the icon in the taskbar and then select the application name. It works for every other application I've tried on my computer, except the Arduino IDE.
I'm running Arduino.CC IDE version 1.8.5 which I believe is the latest.

johncblacker:
I have verified on Windows 10 that if I start two separate instances of the IDE,

Please describe the exact sequence of steps you used to create the second instance.

...R

I right-click the arduino icon in my taskbar, then left-click the arduino icon immediately above the "Unpin from taskbar" line. Doing this with any other application on my system brings up a totally separate copy of the application.

Hopefully someone who is familiar with Windows and understands the sequence of actions will come along to help.

...R