
The Arduino IDE attempts to provide some additional guidance to users based on matches against compilation error messages. This practice was established during a time when some significant breaking changes were made to the common APIs in order to ease the transition. Since that time, the practice has mostly been discontinued. The interpretations are only valid for very old code that is unlikely to be used by the target users now. So their benefit is negligible. The patterns used are inexact, meaning that the interpretations may be printed inappropriately, which is more and more likely as the cases where the matches would be valid become increasingly rare. When the maintenance burden is taken into consideration, it is clear that the harm is far more than any benefits from these. So they are removed. Notes for specific interpretations: > Please import the SPI library from the Sketch > Import Library menu. > As of Arduino 0019, the Ethernet library depends on the SPI library. > You appear to be using it or another library that depends on the SPI library. The target error was more common prior to Arduino IDE 1.6.6 (released ~6.5 years ago), when it was necessary for the sketch to contain `#include` directives for transitive in addition to direct library dependencies (SPI is a common transitive dependency). Due to the nature of the SPI library, it is not often used directly, and when it is used directly it is done by more advanced users who are unlikely to forget the `#include` directive and would have no need for this interpretation even if they did. It is far more likely for the user to forget an `#include` for a popular library, yet Arduino rightly does not attempt to maintain interpretations for those. The "Sketch > Import Library" menu path was renamed to "Sketch > Include Library" ~7 years ago. Arduino IDE 0019 was released ~12 years ago. We can safely assume the migration to the new Ethernet API is complete. > The 'BYTE' keyword is no longer supported. > As of Arduino 1.0, the 'BYTE' keyword is no longer supported. > Please use Serial.write() instead. Arduino IDE 1.0 was released ~10.5 years ago. We can safely assume the migration to the new Serial API is complete. This compilation error pattern is now far more likely to occur due to incorrect usage of a completely unrelated occurrence of the common `BYTE` name in the user's code. > The Server class has been renamed EthernetServer. > As of Arduino 1.0, the Server class in the Ethernet library has been renamed to EthernetServer. > The Client class has been renamed EthernetClient. > As of Arduino 1.0, the Client class in the Ethernet library has been renamed to EthernetClient. > The Udp class has been renamed EthernetUdp. > As of Arduino 1.0, the Udp class in the Ethernet library has been renamed to EthernetUdp. Arduino IDE 1.0 was released ~10.5 years ago. We can safely assume the migration to the new Ethernet API is complete. The compilation error patterns are in no way specific to the Ethernet library so is prone to false positives. > Wire.send() has been renamed Wire.write(). > As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries. > Wire.receive() has been renamed Wire.read(). > As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries. Arduino IDE 1.0 was released ~10.5 years ago. We can safely assume the migration to the new Wire API is complete. Due to the nature of the Wire library, it is not often used directly, and when it is used directly it is done by more advanced users who have less need for an interpretation of the compiler error. > 'Mouse' not found. Does your sketch include the line '#include <Mouse.h>'? > 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'? I left these in because they are the most "recent" (added due to a breaking change made 7 years ago). However, I also feel that these are harmful and should either be removed or changed. The problem is that there is a false match when the user attempts to compile the Keyboard or Mouse libraries for a board which does not have native USB support (e.g., Uno, Mega), even when their sketch does contain the `#include` directives that are recommended by the interpretation. That cause of the compilation error matching the pattern is more common than the case where the user is compiling old code or forgot the `#include` directive, for which the interpretation is valid.
Arduino IDE Extension
Arduino IDE is based on Theia, and most of its IDE features, UIs and customizations are implemented in this Theia extension.
IDE Services
IDE services typically have a backend part in src/node/ and a front-end part in src/browser/.
Boards Service
The Boards Service continuously checks the computer's ports, in order to detect when you connect or disconnect an Arduino board.
The Boards Manager lists all the known board types, and allows downloading new cores to get additional board types.
- src/common/protocol/boards-service.ts implements the common classes and interfaces
- src/node/boards-service-impl.ts implements the service backend:
- discovering ports & boards
- searching for compatible board types
- installing new board types
- src/browser/boards/boards-list-widget.ts implements the Boards Manager front-end:
- browsing/searching available board types
- installing new board types
Core Service
The Core Service is responsible for building your sketches and uploading them to a board.
- src/common/protocol/core-service.ts implements the common classes and interfaces
- src/node/core-service-impl.ts implements the service backend:
- compiling a sketch for a selected board type
- uploading a sketch to a connected board
Serial Service
The Serial Service allows getting information back from sketches running on your Arduino boards.
- src/common/protocol/serial-service.ts implements the common classes and interfaces
- src/node/serial/serial-service-impl.ts implements the service backend:
- connecting to / disconnecting from a board
- receiving and sending data
- src/browser/serial/serial-connection-manager.ts handles the serial connection in the frontend
- src/browser/serial/monitor/monitor-widget.tsx implements the serial monitor front-end:
- viewing the output from a connected board
- entering data to send to the board
- src/browser/serial/plotter/plotter-frontend-contribution.ts implements the serial plotter front-end:
- opening a new window running the Serial Plotter Web App
Config Service
The Config Service knows about your system, like for example the default sketch locations.
- src/common/protocol/config-service.ts implements the common classes and interfaces
- src/node/config-service-impl.ts implements the service backend:
- getting the
arduino-cli
version and configuration - checking whether a file is in a data or sketch directory
- getting the
"arduino"
configuration in the package.json
:
"cli"
:"version"
typestring
|{ owner: string, repo: string, commitish?: string }
: if the type is astring
and is a valid semver, it will get the corresponding released CLI. If the type isstring
and is a date inYYYYMMDD
format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in theowner/repo
will be used. Ifcommitish
is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.
Rebuild gRPC protocol interfaces
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
yarn --cwd arduino-ide-extension generate-protocol
Customize Icons
ArduinoIde uses a customized version of FontAwesome. In order to update/replace icons follow the following steps:
- import the file
arduino-icons.json
in Icomoon - load it
- edit the icons as needed
- !! download the new
arduino-icons.json
file and put it in this repo - Click on "Generate Font" in Icomoon, then download
- place the updated fonts in the
src/style/fonts
directory