Convert Figma logo to code with AI

arduino logoarduino-ide

Arduino IDE 2.x

2,377
396
2,377
552

Top Related Projects

165,325

Visual Studio Code

Your Gateway to Embedded Software Development Excellence :alien:

Arduino command line tool

Source code for the Processing Core and Development Environment (PDE)

Arduino core for the ESP32

STM32 core support for Arduino

Quick Overview

The arduino/arduino-ide repository is the official home for the Arduino IDE 2.x, a modern, feature-rich integrated development environment for Arduino programming. It provides a user-friendly interface for writing, compiling, and uploading code to Arduino boards, as well as tools for debugging and managing libraries.

Pros

  • Modern and intuitive user interface
  • Built-in debugger for easier troubleshooting
  • Supports multiple Arduino board types and third-party boards
  • Faster compilation and upload times compared to the older Arduino IDE 1.x

Cons

  • May have a steeper learning curve for beginners compared to the simpler Arduino IDE 1.x
  • Requires more system resources than the older version
  • Some users report occasional stability issues or bugs
  • Not all third-party libraries and board packages are fully compatible yet

Getting Started

To get started with the Arduino IDE 2.x:

  1. Visit the official Arduino website: https://www.arduino.cc/en/software
  2. Download the appropriate version for your operating system (Windows, macOS, or Linux)
  3. Install the IDE following the instructions for your OS
  4. Launch the Arduino IDE 2.x
  5. Connect your Arduino board to your computer
  6. Select your board type and port in the IDE
  7. Open an example sketch or create a new one
  8. Click the "Upload" button to compile and upload your code to the board

For more detailed instructions and troubleshooting, refer to the official Arduino documentation: https://docs.arduino.cc/software/ide-v2

Competitor Comparisons

165,325

Visual Studio Code

Pros of VS Code

  • Highly extensible with a vast ecosystem of extensions
  • Supports multiple programming languages and frameworks
  • More advanced debugging and version control features

Cons of VS Code

  • Steeper learning curve for beginners
  • Requires more system resources
  • May be overwhelming for simple Arduino projects

Code Comparison

Arduino IDE:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

VS Code (with Arduino extension):

#include <Arduino.h>

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

The code structure is similar, but VS Code requires the Arduino.h header inclusion. VS Code offers more advanced code editing features, syntax highlighting, and autocompletion, while Arduino IDE provides a simpler interface tailored specifically for Arduino development.

Your Gateway to Embedded Software Development Excellence :alien:

Pros of PlatformIO Core

  • Supports multiple platforms and frameworks beyond Arduino
  • Command-line interface allows for easier integration with CI/CD pipelines
  • More advanced dependency management and library handling

Cons of PlatformIO Core

  • Steeper learning curve for beginners compared to Arduino IDE
  • Requires more setup and configuration for simple projects
  • Less intuitive for users who prefer graphical interfaces

Code Comparison

Arduino IDE:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

PlatformIO Core (platformio.ini):

[env:uno]
platform = atmelavr
board = uno
framework = arduino

lib_deps =
    SPI
    Wire

PlatformIO Core allows for more detailed project configuration and dependency management through its platformio.ini file, while Arduino IDE focuses on a simpler, more straightforward approach to coding and uploading sketches.

Both tools serve their purposes well, with Arduino IDE being more beginner-friendly and PlatformIO Core offering more advanced features for experienced developers and complex projects.

Arduino command line tool

Pros of arduino-cli

  • Lightweight and command-line based, ideal for automation and CI/CD pipelines
  • Easier integration with other tools and scripts
  • Faster execution for experienced users

Cons of arduino-cli

  • Steeper learning curve for beginners
  • Lacks visual interface for board and port selection
  • May require additional setup for library management

Code Comparison

arduino-cli:

arduino-cli compile --fqbn arduino:avr:uno MySketch
arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno MySketch

arduino-ide:

// No direct code comparison as arduino-ide is GUI-based
// Users typically write code in the IDE and use buttons to compile/upload
void setup() {
  // Setup code
}

void loop() {
  // Main code
}

The arduino-cli offers a more flexible and scriptable approach, while arduino-ide provides a user-friendly GUI environment. The cli version is better suited for advanced users and automated workflows, whereas the IDE is more accessible for beginners and visual learners. Both tools serve different purposes within the Arduino ecosystem, catering to various user needs and preferences.

Source code for the Processing Core and Development Environment (PDE)

Pros of Processing

  • More versatile for creative coding and visual arts projects
  • Supports a wider range of programming concepts and techniques
  • Larger community and extensive library of examples and tutorials

Cons of Processing

  • Steeper learning curve for beginners compared to Arduino IDE
  • Less focused on hardware integration and microcontroller programming
  • May require more system resources to run complex sketches

Code Comparison

Processing:

void setup() {
  size(400, 400);
  background(0);
}

void draw() {
  ellipse(mouseX, mouseY, 20, 20);
}

Arduino IDE:

void setup() {
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
}

The Processing code creates a simple drawing application, while the Arduino IDE code blinks an LED. This illustrates the different focus of each platform: Processing on visual output and interactivity, and Arduino IDE on hardware control and embedded systems programming.

Arduino core for the ESP32

Pros of arduino-esp32

  • Specialized for ESP32 microcontrollers, offering optimized performance and features
  • Includes ESP32-specific libraries and tools for advanced functionality
  • Frequent updates and active community support for ESP32-related issues

Cons of arduino-esp32

  • Limited to ESP32 boards, lacking support for other Arduino-compatible hardware
  • May require additional setup and configuration compared to the standard Arduino IDE
  • Potential compatibility issues with some Arduino libraries not optimized for ESP32

Code Comparison

arduino-ide:

#include <Arduino.h>

void setup() {
  Serial.begin(9600);
}

void loop() {
  // Standard Arduino code
}

arduino-esp32:

#include <Arduino.h>
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  WiFi.begin("SSID", "PASSWORD");
}

void loop() {
  // ESP32-specific code
}

The arduino-esp32 example showcases built-in WiFi functionality, which is not available in the standard Arduino IDE for most boards. The ESP32 code also typically uses a higher baud rate for serial communication.

STM32 core support for Arduino

Pros of Arduino_Core_STM32

  • Specialized support for STM32 microcontrollers, offering optimized performance and features
  • Access to advanced STM32-specific peripherals and capabilities
  • Larger community of STM32 developers for support and resources

Cons of Arduino_Core_STM32

  • Limited to STM32 boards, lacking the broad hardware support of Arduino IDE
  • May require additional setup and configuration compared to the more user-friendly Arduino IDE
  • Potentially steeper learning curve for beginners unfamiliar with STM32 architecture

Code Comparison

Arduino IDE (generic Arduino code):

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

Arduino_Core_STM32 (STM32-specific code):

#include <Arduino.h>

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
  HAL_Delay(1000);
}

The Arduino_Core_STM32 code demonstrates the use of STM32-specific functions like HAL_GPIO_TogglePin() and HAL_Delay(), which are optimized for STM32 microcontrollers but may require more familiarity with the STM32 hardware abstraction layer.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Arduino IDE 2.x

Build status Check JavaScript status Test JavaScript status

This repository contains the source code of the Arduino IDE 2.x. If you're looking for the old IDE, go to the repository of the 1.x version.

The Arduino IDE 2.x is a major rewrite, sharing no code with the IDE 1.x. It is based on the Theia IDE framework and built with Electron. The backend operations such as compilation and uploading are offloaded to an arduino-cli instance running in daemon mode. This new IDE was developed with the goal of preserving the same interface and user experience of the previous major version in order to provide a frictionless upgrade.

Download

You can download the latest release version and nightly builds from the software download page on the Arduino website.

Support

If you need assistance, see the Help Center and browse the forum.

Bugs & Issues

If you want to report an issue, you can submit it to the issue tracker of this repository.

See the issue report guide for instructions.

Security

If you think you found a vulnerability or other security-related bug in this project, please read our security policy and report the bug to our Security Team 🛡️ Thank you!

e-mail contact: security@arduino.cc

Contributions and development

Contributions are very welcome! There are several ways to participate in this project, including:

  • Fixing bugs
  • Beta testing
  • Translation

See the contributor guide for more information.

See the development guide for a technical overview of the application and instructions for building the code.

Donations

This open source code was written by the Arduino team and is maintained on a daily basis with the help of the community. We invest a considerable amount of time in development, testing and optimization. Please consider donating or sponsoring to support our work, as well as buying original Arduino boards which is the best way to make sure our effort can continue in the long term.

License

The code contained in this repository and the executable distributions are licensed under the terms of the GNU AGPLv3. The executable distributions contain third-party code licensed under other compatible licenses such as GPLv2, MIT and BSD-3. If you have questions about licensing please contact us at license@arduino.cc.