Go Down

Topic: IDE feature I would most like to see: multi-Arduino project support (Read 645 times) previous topic - next topic

Tazling

First let me say that I am impressed with the ease of use of the Arduino IDE.  The pointy-clicky editor is not my cuppa perhaps, but the ability to use any external editor of choice (in my case vim with appropriate syntax formatting) makes everything OK.  Colour me happy.

The only complaint I have about the editor is that I really wish it would remember which port is associated with which sketch!   I routinely work on a 2-Leonardo project (for whatever reasons, these devices are persistently identified as HIDM and HIDF so port assignment is consistent and apparently permanent).  There is one sketch per Leo, and I always work on both at the same time (they are intimately entangled in a distributed architecture with i2c data exchange).  At least once or twice a week I get too absorbed in the coding and forget to change ports manually before uploading an edit to one or the other, and of course that breaks everything.

This is hardly fatal -- I notice right away and fix it -- but it's always darned irritating.   So I would really like the following feature:

1) Port ID to be associated with sketch, so that when you hit Upload on sketch, the correct port is automatically selected prior to upload, no more manual port switching.

and while I'm telling Santa what I want for xmas, I'd also really like to have 2 serial monitors up at the same time, one on each port;  I sometimes really want to see what both of my Leos are logging, since they are talking to each other and performing interlocking operations!  Being able to see only one log at a time is so frustrating.  So, wish number 2:

2) Ability to view one Serial Monitor window per live USB port, so that switching upload focus from one port to the other does not kill the serial monitor window for the first port.

I guess these two features could be called one patch for "multi-Arduino development support".

I believe some alternative IDEs (Platformio?) do offer this feature but frankly, I tried Platformio and Atom and found the whole setup too complicated.  The Arduino IDE satisfies me, except for this one gripe:  I like building multiprocessor systems and would like just these small (?) tweaks to make it less tedious, more efficient, easier.  Any hope?  Or does this limitation reach so deep into the IDE design that it would be horrendous to implement?

Or (hmm, could be embarrassing) does this feature exist somewhere, and I just haven't found it yet?



pert

I believe this is possible with the Arduino Web Editor:
https://create.arduino.cc/editor
this sort of thing has been requested many times for the standard IDE but so far there has been no action on it.

Regarding multiple Serial Monitors, you can do this by opening two instances of the Arduino IDE. That means starting the application twice, not opening multiple windows via the Arduino IDE's File > New, File > Open, File > Sketchbook, or File > Examples. They look the same but are actually different.

Robin2

I use the Geany editor and I have written a Python compile and upload program using the Arduino IDE command line. The details for programming go into a few comment lines at the top of my .ino file - like this
Code: [Select]
// python-build-start
// action, verify
// board, arduino:avr:uno
// port, /dev/ttyACM0
// ide, 1.6.3
// python-build-end

I can call the Python program from a Geany menu. It can also be used at the command line.

Maybe you could call it from VIM

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Tazling

#3
Nov 29, 2017, 02:33 am Last Edit: Nov 29, 2017, 06:35 am by Tazling Reason: results of following advice
I believe this is possible with the Arduino Web Editor:
https://create.arduino.cc/editor
this sort of thing has been requested many times for the standard IDE but so far there has been no action on it.
Sounds like one more whine will not tip the balance, then.  Oh well.

Quote
Regarding multiple Serial Monitors, you can do this by opening two instances of the Arduino IDE. That means starting the application twice, not opening multiple windows via the Arduino IDE's File > New, File > Open, File > Sketchbook, or File > Examples. They look the same but are actually different.
(DOH!)  I didn't realise I could have 2 instances open at once.  I don't know why I assumed I couldn't (file access conflicts?).  That would certainly solve the immediate problem!  click on sketch A, and I'm talking to instance A, which I can configure with the right port for sketch A.  I'd still really prefer to store the port association with the sketch, but 2 instances of IDE is a good enough solution for now.

@Robin2, thanks for the link, sounds pretty nifty... but I'm getting old and tired and lazy enough that I've become quite resistant to switching toolsets, once I've got used to one... after enough decades spent in the geek world, "new app fatigue" starts to set in, just like "new language fatigue".  I think I'll stick w/stock IDE and just run 2 of 'em.

UPDATE:  just in case someone else OSX-based wants to do this same trick, here's what I came up with after brief experimentation.  Remember that OSX doesn't like 2 instances of the same app, so you have to outwit it (mildly) by going to the command line to start the 2nd instance.  So I thought, why not just go CLI for both?  And I bet  the first arg to IDE is the name of the sketch, so...

Code: [Select]
#!/bin/csh
# open the ide with the default files I'm working on right now,
# two instances so I can have 2 serial monitors and maintain my port assignments
# which will have to be set up once at start of session
open -n -a "Arduino" /Users/Moi/Work/ARDUINO/devel/PROJECTS/USBcycle_Leo1/USBcycle_Leo1.ino
open -n -a "Arduino" /Users/Moi/Work/ARDUINO/devel/PROJECTS/USBcycle_Leo2/USBcycle_Leo2.ino


When I run this script, yippee yi yay, I get twin IDE instances, one with Leo1 sketch pre-opened and ready to edit, the other with Leo2 sketch.  These are the 2 processors for my project.  All I have to do then is plug in my usb cables and choose the correct USB port for each board.  I am much indebted to pert for the suggestion.

UPDATE 2: (a few hours later)  2 instances of IDE working just dandy.  At last I can see both my Leo logs and compare them during an extended use of the controller.  Can't believe I didn't think to try this before.

Juraj

you have two boards of same type, but it would be better if the board settings was remembered for the sketch too.

it is one of reasons why I use Eclipse IDE

Robin2

UPDATE:  just in case someone else OSX-based wants to do this same trick, here's what I came up with after brief experimentation.
More evidence that a MAC is just a Linux PC in a party dress :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Tazling

More evidence that a MAC is just a Linux PC in a party dress :)
which is why I love my OSX beast despite the occasional annoyances of dealing with Appleware.  best of both worlds imho.  I spent most of my long hacking lifetime with *nix of various flavours, so I feel pleasantly at home with OSX "under the hood" & have all my familiar CLI tools handy, but can be lazy and enjoy the slick Apple-flavoured commercial stuff too.

Robin2

@Robin2, thanks for the link, sounds pretty nifty... but I'm getting old and tired and lazy enough that I've become quite resistant to switching toolsets,
There should be no problem implementing a similar system in whatever programming language you are familiar with.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up