Get Started With The New Arduino IDE 2.0

Arduino IDE 2 .0

All the exciting features are available in the newest Arduino IDE.

Since the beginning of 2021, the Arduino IDE 2.0 has been in beta. Back then, we gave it a try and were impressed. We had to give 2.0 another go as soon as Arduino declared it to be in a stable release.

The original IDE has been enhanced in several ways by the Arduino IDE 2 .0. Especially notable is the updated user interface. Here are a few more end-user improvements.

Arduino IDE 2.0

Get Started With The New Arduino IDE 2.0 image 22

Code autocompletion, which is helpful while typing in lengthy parts of code, is added in the Arduino IDE 2 .0. The IDE suggests potential keywords and instructions as we type.

Get Started With The New Arduino IDE 2.0 image 24
before and after theme update

If you like your code editors dark, then Arduino IDE 2.0 has a plethora of themes to choose from.

Arduino IDE 2.0 Theme Step-by-step

Get Started With The New Arduino IDE 2.0 image 25

located under File >> Preferences in the menu. Change the theme to your preference and every feature of the editor will accommodate your wish.

Get Started With The New Arduino IDE 2.0 image 26

The Serial Plotter has finally undergone an update, and it now looks amazing. Analog signals and voltages can be measured and analyzed using a serial plotter.

For our boards and software libraries, Arduino IDE 2.0 features in-app upgrades and faster compilation times. Speaking of updates, we can get the most recent version of Arduino IDE 2.0 directly from the app, saving us the hassle of visiting the Arduino website to download it.

Getting to Know Arduino IDE 2.0

Utilizing the new IDE is the greatest way to learn how it works. In this tutorial, we’ll download and set up the new IDE and then use it to make a fun NeoPixel project.

  1. Visit the official Arduino website in a browser to access the installation for your OS system. Since our PC runs Windows 11, we downloaded the 64-bit version. LINK( https://www.arduino.cc/en/software)
Get Started With The New Arduino IDE 2.0 image 27

After completing the installation procedure, launch the Arduino 2.0 IDE.

Get Started With The New Arduino IDE 2.0 image 28
Get Started With The New Arduino IDE 2.0 image 29

Activate a firewall exception for the Arduino IDE. To make sure we have the most recent version and software libraries, the IDE will contact its servers.

Get Started With The New Arduino IDE 2.0 image 30
  1. Install the USB driver if asked to do so. Due to this, the Arduino IDE is able to interface with a variety of development boards, including the Arduino Uno and Raspberry Pi Pico.

Interesting About The New Arduino IDE 2.0

The “front of house” of the new IDE has undergone numerous upgrades, and we must admit that it looks fantastic. We’ve put together a quick guide on where to locate the new features, whether you’re new to Arduino or a seasoned pro.

The fundamental components of the Arduino 2.0 IDE have undergone considerable revision.

Get Started With The New Arduino IDE 2.0 image 31
  1. Sketch AreaThis is where we write the code that creates our project (Sketches are Arduino slang for our project files).
  2. Output AreaThe results from installing new software libraries and diagnostic information are displayed in the output section as our code is flashed to a microcontroller.

The left of the application is where the modification has occurred. Quick access to a number of hitherto hidden but often used features is provided by a new vertical menu.

Get Started With The New Arduino IDE 2.0 image 32

Get Started With The New Arduino IDE 2.0 image 33
  1. Sketchbook: For quick access, all of the sketches (for our projects) are collected here. The demonstration project for this how-to is in Our Sketchbook.
  1. Boards Manager: This is where we install support for the various boards that the Arduino IDE 2,0 can be used.
  2. We may install, update, and uninstall software libraries for our projects using the library manager. For instance, we can set up libraries to manage sensors, Wi-Fi, and NeoPixels.
  3. Run the debug tool to see if there are any issues in our code.
  4. Use the search feature to narrow down the values in your project. Here, we use search to look for a certain constant that controls how quickly our demonstration project runs.
Get Started With The New Arduino IDE 2.0 image 34

6. Board selection: The Arduino IDE supports a variety of boards, and this dropdown menu makes it simple to switch between boards and find the right COM port.

Installing software and configuring a board

It is best to start a project when learning a new IDE, especially one that looks as attractive as Arduino IDE 2.0. We get to become familiar with all the new features and enhance our work process.

We developed a straightforward project using Adafruit’s NeoPixel library for Arduino boards to make a short RGB LED light show for the evenings in order to test the Arduino 2.0 IDE.

  1. Connect your compatible Arduino Uno to your PC. The best choice is to use an actual Arduino, but similar boards will function just as well.
  2. From the Board selection dropdown, select your Arduino. The board and port will be configured and ready for use after this. Other types of boards might need more configuration.
Get Started With The New Arduino IDE 2.0 image 35

If you’re using an actual Arduino IDE 2.0 , omit this step. Select another board and port by clicking the Boards dropdown menu.

Get Started With The New Arduino IDE 2.0 image 36

4. If you’re using an actual Arduino, omit this step. Find your board by searching for it, then pick it and the proper port. If you’re unsure about the port, consult our guide for further details.

Get Started With The New Arduino IDE 2.0 image 37

5.To find Adafruit NeoPixel, select the Library Manager and perform a search. Click Install after choosing Adafruit NeoPixel from the list.

Get Started With The New Arduino IDE 2.0 image 38

How to create NeoPixel Project

Why are WS2812B addressable RGB LEDs, also known as “eoPixels” by Adafruit, a wonderful approach to introduce microcontrollers and the new Arduino IDE? They are simply a lot of fun. Each RGB LED’s color and brightness can be adjusted to produce animations and effects.

Materials needed for this Project

Get Started With The New Arduino IDE 2.0 image 39

The project’s circuit is straightforward. The three GPIO pins on the Arduino are wired up with our NeoPixels. It’s simple to solder connections to your NeoPixels even if you’ve never done it before.

Get Started With The New Arduino IDE 2.0 save

It is entirely safe to connect up to eight NeoPixels to an Arduino Uno, but if you connect more than that, you should think about using external power for the NeoPixels.

To control a short chain of NeoPixels and change their color from red to green to blue, we will utilize the NeoPixel library from Adafruit.

  1. To make a new sketch, choose File >> New. Make the sketch’s contents clear.
  2. Sketch should have the Adafruit NeoPixel library. Python programmers are likely already familiar with this; in Python, a module of code is imported.
#include <Adafruit_NeoPixel.h>

3. Make three constants that represent the number of LEDs in our chain, a pause (in milliseconds), and the GPIO pin used for the NeoPixel data pin. We have 96 LEDs in our chain, are using GPIO pin 6, and want a 10 ms wait between each change in LED color. It’s best to limit the number of LEDs to eight or less when using the Arduino’s 5V supply. In our example, we picked 96 to succinctly show how a long strip of NeoPixels functions.

#define LED_PIN    6
#define PAUSE 10
#define LED_COUNT 96

4. Declare the NeoPixel object while passing the bitstream of the pixels, the number of pixels (LEDs), the GPIO pin that is being used, and the configuration of the LEDs (RGB or GRB) (typically 800 Hz).

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

5.To initialize the NeoPixels, turn off the LEDs, and then set the brightness to 25, create a function, set it up, and utilize it. A number between 0 and 255 represents brightness. 25% is 10% brightness.

void setup() {
 strip.begin();
 strip.show();
 strip.setBrightness(25);
}

6. Create a function, a loop, and use it to utilize a wipe action to change the LEDs’ colors to red, green, and blue (we will later create this function). To add a 10 ms delay, use the PAUSE constant.

void loop() {
 colorWipe(strip.Color(255,   0,   0), PAUSE); // Red
 colorWipe(strip.Color(  0, 255,   0), PAUSE); // Green
 colorWipe(strip.Color(  0,   0, 255), PAUSE); // Blue
}

7. Make the colorWipe function with the delay time and color as inputs.

void colorWipe(uint32_t color, int wait) {

8. Create a for loop that iterates through all of the LEDs in the strip, setting the color of each pixel before stopping for 10 ms and then moving on to the next LED. This for loop should be contained inside the function.

for(int i=0; i<strip.numPixels(); i++) {
   strip.setPixelColor(i, color);
   strip.show();
   delay(wait);
 }
}

Complete List of Codes

#include #define LED_PIN 6 #define PAUSE 10 #define LED_COUNT 96 Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { strip.begin(); strip.show(); strip.setBrightness(25); } void loop() { colorWipe(strip.Color(255, 0, 0), PAUSE); // Red colorWipe(strip.Color( 0, 255, 0), PAUSE); // Green colorWipe(strip.Color( 0, 0, 255), PAUSE); // Blue } void colorWipe(uint32_t color, int wait) { for(int i=0; i