In the Arduino environment, we write sketches that can be uploaded to Arduino boards. In this tutorial, we will go through how to select a board connected to your computer, and how to upload a sketch to that board, using the Arduino IDE 2.
There are two main tools when uploading a sketch to a board: verify and upload. The verify tool simply goes through your sketch, checks for errors and compiles it. The upload tool does the same, but when it finishes compiling the code, it also uploads it to the board.
A good practice is to use the verifying tool before attempting to upload anything. This is a quick way of spotting any errors in your code, so you can fix them before actually uploading the code.
Uploading a sketch is quick and easy, but let's take a look at what we need to do.
So connect your board to the computer and select it from the drop down menu. You'll know that there is a connection to the board when the board name appears in bold.
If you are using a version of Arduino IDE earlier than 2.0, the IDE interface will look different, as shown in the figure.
① Verification
② Upload
③ new file
④ Open
⑤ Save
⑥ serial port
A large part of the Arduino programming experience is the use of libraries. There are thousands of libraries that can be found online, and the best documented ones can be found and installed directly through the editor.
In this tutorial, we will go through how to install a library using the library manager in the Arduino IDE 2. We will also show how to access examples from a library that you have installed.
Libraries are incredibly useful when creating a project of any type. They make our development experience much smoother, and there almost an infinite amount out there. They are used to interface with many different sensors, RTCs, Wi-Fi modules, RGB matrices and of course with other components on your board.
Arduino has many official libraries, but the real heroes are the Arduino community, who develop, maintain and improve their libraries on a regular basis.
If you need to add local library files, you can follow the steps below,Click the button in sequence:Sketch-->include Library-->add .zip library