Saturday, April 17, 2021

The new Arduino IDE

For an index to all my stories click this text

This hobby community never ceases to amaze me. Just a few weeks ago Arduino CC introduced the new Arduino IDE. I know it is a beta version but still.....and almost nobody noticed or paid attention to it !!! And that really is a shame because it brings a lot of new features. Features some of us have been waiting for for a long time.

The new Arduino IDE is called 2.0 beta. Basically this is a pre-release so it might have some bugs. But I have tried it now for a few weeks and think it is already functional allthough it has some minor bugs. You can get it from the Arduino site and it installs next to your trusted IDE. So don't worry, your projects are safe and not messed up when you install this new version. You can find it here: https://www.arduino.cc/en/software

So lets have a quick look at some of the new features.
 
A new look



The look is somewhat different from the old IDE, being a bit more modern. Most features are accessible trough the drop-down menu's just like you are used to. However there are some features accessible through the icons on the left.



The top left icon gives access to the board manager. A menu opens through which you can scroll. On the top is however a search function, just like in the old IDE.



The second icon gives access to the library manager. Like the board manager you can scroll through the list or use the search function at the top.



As you can see the library manager has what is called autocompletion. If you start typing it already alters the options depending on your search. In the above example I search for the Dallas DS18B20 library and typing dall is already sufficient to bring it up. You can see that the IDE indicated that I have installed version 3.8.0



As soon as your mouse hovers over the text the library manager shows (at the bottom of the text) that there is a new version and gives the option to install it. Clicking "more info" opens the website for that library where you can find additional information.

This works faster as the old library manager.

Installing new microcontrollers.

Not all microcontrollers are installed with the new IDE. In my case the ESP8266 and ESP32 boards were installed. The Arduino boards, like the Arduino Uno, were not. Strange as this is an Aruino prduct. But they must have their reasons (sponsoring ??).



Here I have choosen the Wemos D1 mini board. Clicking on that text brings up a pop-up menu with the option to select another board. Click on that and a new screen will open.



As you can see the Arduino Uno and several other boards are greyed out, so not available. Clicking on that board and on the OK button at the right bottom of the screen present s a pop-up screen.



So here you have the possibillity to install the Arduino boards.

Line numbering is standard activated

You will have noticed from the previous screendumps that line numbering is not an option but standard activated which I think is a great plus.

Autocompletion
 

As soon as you start typing a command, the editor can complete the command for you. Here I am starting a Serial communication for the serial monitor and the IDE gives me all options that I can use to finish the command.



As soon as you start typing parenthesis and/or quotation marks the IDE already puts the end quotation mark and parenteses on the screen.



And look at the small red sign at the end of the accolade (where the arrow points) and the red vertical line at the end of the screen where the other arrow points to.
The IDE indicates that it spotted an error. Can you see it ???

In both lines I forgot the ; at the end.



Put your mouse at the end-accolade and the IDE tries to give you a hint about what the error might be.

Try to move your mouse over a command and the IDE will give you also a hint about the syntax of that command.



And just look at these nice vertical lines that indicate which parts of the program belong together.....



Put your mouse next to the line numbers and down-arrows appear.



Click on the down-arrow and that part will collapse.
For a small program like this, this is not interesting. But it is an enormous aid in debugging large programs !!!!
Click again on the down-arror and the text is unfolded.

Any disadvantage ??

Yes there is a disadvantage. Be it a minor one.
When you have a file open and want to open another one, the new file opens in a new screen. That is not a disadvantage. The disadvantage is that it takes some time........

That's it for now.

I haven touched the debug function yet. There is a lot to be discovered there. And there are a lot of other new things to be discovered. This was just a quick look. And the verdict is YES. I am going to use this new IDE for programming my microcontrollers !!!

Till next time
Have fun

Luc Volders