Multiple instances of Arduino and multiple serial port monitors

Hi all

I'm new to Arduino and am working on a number of ESP8266 devices. One of the devices is a web server and 3 of them are web clients.

I can open 4 instances of Arduino development environment (1.8.2) but hoped I could also have 4 serial monitors to check the debug output of all the devices independently.

The problem is that if I set instance 1 to COM20, all of the other instances change to COM20. If I set any instance to COM21, all change to COM21.

Is there a procedure I could follow to run 4 (or more) instances and have 4 (or more) instances of the serial port monitor?

I hope this isn't a duplication, but I did search the site for this issue, but can't find it.

Thanks for reading....

Steve

There are ways but with the "default" install of the IDE then there is currently no way.

However there are a few programs out there that allow you to do it. If you have advance to the level of needing to do that (which is above the simplicity of the IDE) Then PLX_DAQ V2 (see this post)

Or many of the other free terminal programs that will allow you yo open multiple instances of the program.

Hi Ballscrewbob and thanks for your very quick reply.

It's a pity the IDE can't handle multiple COM ports as it would be great to click on Upload in each of 4 ide's, go and have a coffee, come back and it's done.

I find that with only 1 COM port usable, it's quite easy to send the wrong code to a device, unless you're pretty sharp at port switching.

I did use 4 instances of Teraterm which worked OK, but then to re-program all devices, you have to disconnect all 4 Teraterm instances and then choose each serial port manually in the IDE.

Would it be possible to have multiple installations of the the Arduino IDE in different folders? Just grasping at straws....

My background is PIC and I'm pretty amazed at how quickly you can put a project together with Arduino.

Cheers

Steve

Yes it is do-able for multiple IDE's but there are a couple of caveats. Your mileage may also differ.

Setting up IDE's on "portable" mode should give you what you want. But don't hold me to it.

I would like a feature to "lock out" individual ports to prevent over writing a board. But so far not seen anything suitable or even in that scope.

At least on Windows, it's possible. You just need to create the multiple instances by opening the Arduino IDE multiple times (e.g clicking the Arduino IDE icon in your start menu or clicking on a .ino file). This creates isolated instances that don't affect each other. If you create multiple instances via File > Open or File > Examples or File > Sketchbook in the Arduino IDE then the instances are forced to use a single port and a single board and any changes in one instance will affect the other instances.

Thanks both for your replies. Pert your solution works great with 1.8.2. I just set up a single server and 2 clients and loaded each one by double-clicking the .ino files.

Then I configured the com ports for each instance and as you say each instance did not affect the others. Then I clicked on the upload button in all 3 instances and all 3 compiled in parallel and uploaded to the correct device.

I have 2 monitors so I then opened a serial monitor for each of the 3 instances on the second and each showed the correct output from each device.

Or I short it works!!! so thanks :-)

I now have a suggestion for an improvement; the name of each monitor is the com port number. It would be helpful if it included the project name too eg COM25-Webserver.

Cheers

Steve

Oh now you want miracles too :wink:
LOL

take look at https://forum.arduino.cc/index.php?topic=480263.0

Ballscrewbob I was always taught if you don't ask you don't get :-). It's good to see a forum so alive with help coming forward so quickly.

Neutrinos yes matching ide/serial monitor colours would be helpful. I've added a +1 from me.

Thanks to all for your replies.

Steve

Well while I'm on a roll trying to scrounge more features, I thought I'd ask for more. Please feel free to ignore me :-)

I had 2 instances of the same code for 2 different devices. Then I modified the code in instance 1 and saved it and the code in instance 2 did not change. Then in instance 2, I did file/open and re-opened the .ino file but after that the code was still the old version. The fix was to close the ide and double click on the .ino file then I had the new version.

I'm guessing if you do file/open for the currently loaded file, the ide is coded to do nothing. So I have a couple of suggestions:

1) have a Reload option on the file menu. 2) in some other ide's I've used, they poll the file on disk and ask if you'd like to reload if the date/time of the copy on disk changes.

Anyway thanks to the authors for an excellent product.

Cheers

Steve

picitup: 2) in some other ide's I've used, they poll the file on disk and ask if you'd like to reload if the date/time of the copy on disk changes.

Something of this sort has already been implemented by the Arduino developers and is planned for incoporation into the next release: https://github.com/arduino/Arduino/pull/6074 However, the description indicates there will be no confirmation, the IDE will just automatically update when the file has been changed.

There are test builds available in that pull request if you want to test out the new feature.

Thanks pert that feature sounds great and no confirmation would be fine for me as mostly I'd prefer to keep copies in sync. I'm a bit tied up refurbing my trailer at the mo but I'll download it and try it as soon as I can.

Cheers

Steve

Sounds like another CREATE feature escaped Will have to play with it. Thank Pert you are the best.

picitup: I had 2 instances of the same code for 2 different devices. Then I modified the code in instance 1 and saved it and the code in instance 2 did not change. Then in instance 2, I did file/open and re-opened the .ino file but after that the code was still the old version. The fix was to close the ide and double click on the .ino file then I had the new version.

Steve

It is an other subject, maybe open other topic ...

You can use an exten text editor (as notepad++) detecting source was changed by an other program

Arduino : 1.8.2 (Windows 8.1), Carte : "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\SADIKHIBNOUSMANE\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10802 -build-path C:\Users\SADIKH~1\AppData\Local\Temp\arduino_build_168522 -warnings=none -build-cache C:\Users\SADIKH~1\AppData\Local\Temp\arduino_cache_163357 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\SADIKHIBNOUSMANE\Desktop\MEMOIRE\projet_memoire\projet_memoire.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\SADIKHIBNOUSMANE\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10802 -build-path C:\Users\SADIKH~1\AppData\Local\Temp\arduino_build_168522 -warnings=none -build-cache C:\Users\SADIKH~1\AppData\Local\Temp\arduino_cache_163357 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\SADIKHIBNOUSMANE\Desktop\MEMOIRE\projet_memoire\projet_memoire.ino Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Detecting libraries used... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\SADIKH~1\AppData\Local\Temp\arduino_build_168522\sketch\projet_memoire.ino.cpp" -o "nul" Generating function prototypes... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\SADIKH~1\AppData\Local\Temp\arduino_build_168522\sketch\projet_memoire.ino.cpp" -o "C:\Users\SADIKH~1\AppData\Local\Temp\arduino_build_168522\preproc\ctags_target_for_gcc_minus_e.cpp" exec: "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++": file does not exist Erreur de compilation pour la carte Arduino/Genuino Uno

@ babacarsadikh

What is your post about ?

And why just jump in on somebody else without even an explanation. ?

Well the new version works like a charm on a quick test. Under Windows 7 I installed the new release, opened up the same file 3 times by double-clicking on the .ino file and had 3 instances of the ide running.

Then in instance 1 I added an @ symbol to a comment and when I saved it, the other 2 updated instantly with the @ symbol.

Thanks to the authors!

Cheers

Steve