how can I easily programm multiple sketches with different board configurations?
I.e.
Sketch 1 for ESP32
Sketch 2 for ATTiny85
Sketch 3 for Arduino Uno
Every time I open an other sketch I have to change the board (and maybe the programmer). It would be nice to have the configration stored in the sketch folder so this will be loaded instead of a global configuration.
Currently I create a comment block and write down the configuration for each sketch. So if I find an error in sketch 1 I have to reconfigure...
Hi, sorry for being not enough detailed.
I‘m not talking about the inclusion of multiple micro controllers for one project. The sketches are completly independent.
Sketch 1 for the ESP32 is controlling LED strips and using NTP, a web server and Email.
Sketch for ATTiny is a very simple controller for a DFPlayer.
And the Arduino Uno sketch will be a testing system for a DFPlayer with serial debugging.
So there is currently not really much code sharing between the sketches.
But if I experience an issue in the ESP project I have to reconfigure the IDE for the used ESP32. And reconfigure again if I want to work on the Uno project.
Do a search in this section of the forum for the keyword "portable"; I think that there are two topics with a workaround for the lack of a "portable install" option in IDE 2.x.
How this works in IDE 1.x:
Extract the zip version somewhere on your PC.
Create a directory called portable in the unzipped directory.
Configure the IDE to use a specific sketchbook directory.
Install required board packages and libraries.
Start working by starting the IDE in the unzipped directory.
You can have multiple unzipped installations, each with their own sketchbook directory, board packages and libraries,
If you configure the sketchbook directory to be in the portable directory you can actually have a full project which includes the board package and libraries that were used for the project. Once the project is completed, never upgrade the board package and libraries of the project and as a result you will always be able to rebuild it with the versions that were used.
New project? Repeat the steps above.
As mentioned, IDE 2.x unfortunately does not have that option yet although it has been asked for.