The Arduino IDE 2.0 has been in beta since early 2021, and in those early days, we took it for a test drive and were impressed with what we saw. When the Arduino announced that 2.0 had been ported to a stable version, we just had to take it out for another cycle.
Arduino IDE 2.0 brings a number of improvements to the original IDE. Most notably, an updated user interface. Here are some additional improvements for the end user.
The Arduino IDE 2.0 offers code autocompletion, which is useful when writing large sections of code. As we type, the IDE suggests potential keywords/commands that we can use. This feature has been standard on many other IDEs, and is a welcome addition to the Arduino IDE 2.0.
If you like your code editors dark, the Arduino IDE 2.0 has a large number of themes to choose from.
Found in File >> Preferences menu. Change the theme to your liking and every aspect of the editor will meet your demand.
Finally, Serial Plotter has received an update and now looks amazing. A serial plotter is useful for measuring and interpreting analog signals and voltages.
Under the hood, the Arduino IDE 2.0 sees improved compile time and in-app updates for our boards and code libraries. Speaking of updates, the Arduino IDE 2.0 can also be updated from the app, which saves us the trouble of downloading the latest version from the Arduino website.
Getting to know the Arduino IDE 2.0
The best way to understand the new IDE is to use it. In this method we will download and install the new IDE and then use it to create a fun project using NeoPixels.
1. Open a browser and go to Arduino official website To download the installer for your operating system. We are using Windows 11, and so we downloaded the 64-bit version for our PC.
2. Follow the installation process And the, When finished, start the Arduino 2.0 IDE.
3. Allow the Arduino IDE through your firewall. The IDE will communicate with its servers to ensure that we have the latest versions and libraries of the software.
4. When prompted, install the USB driver. This allows the Arduino IDE to communicate with many different development boards, such as the Arduino Uno and the Raspberry Pi Pico.
New Arduino 2.0 IDE
The new IDE has seen many “front of the house” improvements, and we have to say it looks amazing. Whether you’re new to Arduino or a seasoned pro, we’ve put together a quick reference on where to find the new features.
The Arduino 2.0 IDE has undergone a significant redesign, but the basic elements remain the same.
1. This is the schemeA (Sketches are the Arduino language for our project files) where we write the code that makes our project.
2. output area It is where we see the output of installing new software libraries and debugging information as our code is flashed to the microcontroller.
What has changed is to the left of the application. The new vertical menu has quick access to a number of hidden, but well-used features.
1. Sketchbook: here are all the drawings (Our projects) are contained for quick access. Our sketchbook contains the pilot project for this method.
2. Board manager: The Arduino IDE can be used with many different boards and here we can install support for it.
3. Library manager: This is where we can install, update and remove software libraries for our projects. For example, we can install libraries to control NeoPixels, Wi-Fi, and sensors.
4. revision: Running the debug tool will show any errors in our code.
5. seek: Use this to find a specific value in your project. Here we use search to search for a specific constant that we use to control the speed of our test project.
6. Board selection: The Arduino IDE can work with many different boards and this dropdown menu makes it easy to change boards and locate the correct COM port.
Panel configuration, software installation
The best way to learn a new IDE, especially one that looks as good as the Arduino IDE 2.0 is to do a project. We learn all new features, and improve our workflow.
To test the Arduino 2.0 IDE, we created a simple project that uses Adafruit’s NeoPixel library for Arduino boards to create a fast RGB LED light show for dark nights.
1. Connect the Arduino Uno (or compatible) to your computer. Using the original Arduino is the best option, but compatible boards will also work.
2. Select your Arduino from the board selection dropdown list. This will make the board and port ready for use. Other types of panels may require additional configuration.
3. Skip this step if you are using a native Arduino. From the Boards dropdown menu, click “Select Board and Other Port”.
4. Skip this step if you are using a native Arduino. Find your board, then select it and the correct port. If you are not sure about the port, See our guide for more information.
5. Click on Library Manager And the Look for the Adafruit NeoPixel. Select Adafruit NeoPixel from the list and click Install.
Create a NeoPixel project
NeoPixels, Adafruit’s term for WS2812B RGB LEDs, is a great way to introduce microcontrollers and the new Arduino IDE. why? Simply put, they are so much fun. We can control the color and brightness of each RGB LED to create animations and effects.
For this project you will need
The circuit for this project is simple. Our NeoPixels are connected to three GPIO pins on the Arduino. If you haven’t soldered before, fear not because NeoPixels solder connections are straightforward. Take a look at our website How to solder Raspberry Pi Pico pins The guide that will give you the basics. If you need a soldering iron, Pincil V2 A great tool for all budgets and user levels.
wire color | Arduino GPIO | NeoPixel |
red | 5 volts | VCC / V / 5V |
yellow | 6 | entering info |
black | GND | GND |
Connecting up to eight NeoPixels to the Arduino Uno is completely safe, but anymore you have to think about it NeoPixels external power
We’ll use Adafruit’s NeoPixel library to control a short string of NeoPixels, changing their color from red to green and then blue.
1. Click File >> New to create a new drawing. Erase the contents of the drawing.
2. Include the Adafruit NeoPixel library in the diagram. Python programmers will be familiar with this, in Python we import a unit of code.
#include
3. Create three constants containing the GPIO pin used for the NeoPixel data pin, pause (in milliseconds) and the number of LEDs in our string. We are using GPIO pin 6, we want 10ms pause between each LED color change and we have 96 LEDs in our chain. Best practice is to keep the number of LEDs below eight if using a 5V source on the Arduino. In our example, we briefly used 96 to demonstrate how a long strip of NeoPixels works.
#define LED_PIN 6
#define PAUSE 10
#define LED_COUNT 96
4. Define a NeoPixel object And the Passing the number of pixels (LEDs), what GPIO pin is used, LED configuration (RGB or GRB) and pixel bitstream (usually 800 Hz).
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
5. Create and setup a function and use it to configure the NeoPixels, turn off the LEDs and then set the brightness to 25. Brightness is a value between 0 and 255. A value of 25 is 10% brightness.
void setup() {
strip.begin();
strip.show();
strip.setBrightness(25);
}
6. Create a function, loop, and use it to set the color of the LEDs to red, green, and blue using a sweep action (We will create this function later). Use the PAUSE constant to add a delay of 10ms.
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. Create a colorWipe function that uses color and delay time as arguments.
void colorWipe(uint32_t color, int wait) {
8. Inside the function, create a for loop that iterates across all the LEDs in the strip, Adjust the color of each pixel before pausing for 10 milliseconds and then moving to the next LED.
for(int i=0; i
Complete code list
#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
#Arduino #IDE