You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learn/01.starting-guide/00.getting-started-arduino/getting-started-arduino.md
+96-33Lines changed: 96 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,69 @@ The Arduino platform has since its start in 2005, grown to become one of the mos
8
8
9
9
But what are the cornerstones of Arduino? What is a "board", how do I write code to it, and what are the tools needed to create my own project? The goal with this guide is to provide you with an overview to the Arduino project.
10
10
11
-
***In this guide, you will find links to articles that goes more in depth on a specific topic.***
11
+
***In this guide, you will discover a lot of topics related to the Arduino Ecosystem, and links that lead to more in-depth articles.***
12
+
13
+
14
+
## [Overview](#overview)
15
+
16
+
This guide is divided into four main sections: **hardware**, **software tools**, **Arduino API**, and **Quick Reference**. You can navigate to each of these sections directly through the links below:
17
+
18
+
### [Arduino Hardware](#arduino-hardware)
19
+
20
+
In this section, we will dedicate some time to learn about some fundamentals in electronics, and about a basic operation of an Arduino board.
21
+
22
+
-[Anatomy of an Arduino Board](#anatomy-of-an-arduino-board)
23
+
-[Basic Operation](#basic-operation)
24
+
-[Circuit Basics](#circuit-basics)
25
+
-[Electronic Signals](#electronic-signals)
26
+
-[Analog Signal](#analog-signal)
27
+
-[Digital Signal](#digital-signal)
28
+
-[Sensors & Actuators](#sensors--actuators)
29
+
-[Serial Communication Protocols](#serial-communication-protocols)
30
+
-[Memory](#memory)
31
+
-[Embedded Components](#embedded-components)
32
+
-[Internet of Things (IoT)](#internet-of-things-iot)
33
+
34
+
### [Arduino API](#arduino-api)
35
+
36
+
In this section you will learn what the Arduino API is, and how to create code that can run on your Arduino board.
In this section you will how to set up your development environment as well as learning about what options there are.
48
+
49
+
-[A Typical Workflow](#a-typical-workflow)
50
+
-[Arduino IDE 1.8.x](#arduino-ide-18x)
51
+
-[Arduino IDE 2.0.x](#arduino-ide-20x)
52
+
-[Arduino IoT Cloud](#arduino-iot-cloud)
53
+
-[Web Editor](#web-editor)
54
+
-[Library Manager](#library-manager)
55
+
-[Arduino CLI](#arduino-cli)
56
+
57
+
### [Quick Reference](#quick-reference)
58
+
59
+
The quick reference is an extract from the full Arduino API, containing popular functions, structures and methods.
60
+
61
+
-[General](#general)
62
+
-[Serial Communication](#serial-communication)
63
+
-[GPIO / Pin Management](#gpio--pin-management)
64
+
-[Structure](#structure)
65
+
66
+
67
+
12
68
13
69
## Overview
14
70
15
71
This guide is divided into three main sections: **hardware**, **software tools**, and **Arduino API**. The sections just below summarizes the learning outcome of this article:
16
72
17
-
### Hardware
73
+
### [Hardware](#arduino-hardware)
18
74
19
75
In this section, we will dedicate some time to learn about some fundamentals in electronics, and about a basic operation of an Arduino board.
20
76
@@ -25,7 +81,7 @@ In this section, we will dedicate some time to learn about some fundamentals in
25
81
- Creating a circuit with external sensors and actuators.
26
82
- Internet of Things (IoT) and different radio modules & wireless protocols.
In this section you will how to set up your development environment as well as learning about what options there are.s
31
87
@@ -34,7 +90,7 @@ In this section you will how to set up your development environment as well as l
34
90
- Learn about the Arduino Cloud Service.
35
91
- Intro to the Arduino CLI (Command Line Interface).
36
92
37
-
### The Arduino API
93
+
### [The Arduino API](#arduino-api)
38
94
39
95
In this section you will learn what the Arduino API is, and how to create code that can run on your Arduino board.
40
96
@@ -43,7 +99,10 @@ In this section you will learn what the Arduino API is, and how to create code t
43
99
- How do I upload code to an Arduino board?
44
100
- What is a "core/platform"?
45
101
- Core specific API.
46
-
- Quick reference to the Arduino API.
102
+
103
+
### [Quick Reference](#quick-reference)
104
+
105
+
- General
47
106
48
107
## Arduino Hardware
49
108
@@ -53,7 +112,7 @@ Over the years, Arduino has released hundreds of hardware designs in many shapes
53
112
54
113
While all Arduino boards differ from each other, there are several key components that can be found on practically any Arduino. Let's take a look at the image below:
55
114
56
-
![Key components of an Arduino board.]()
115
+

57
116
58
117
-**1.** Microcontroller - this is the brain of an Arduino, and is the component that we load programs into. Think of it as a tiny computer, designed to execute only a specific number of things.
59
118
-**2.** USB port - used to connect a USB cable from your computer.
@@ -79,27 +138,27 @@ The program that is loaded to the microcontroller will start execution as soon a
79
138
80
139
The speed of a program is incredibly fast, unless we tell it to slow down. It depends on the size of the program and how long it takes for the microcontroller to execute it, but it is generally in **microseconds (one millionth of a second)**.
81
140
82
-
![The basic operation of an Arduino.]()
141
+

83
142
84
143
### Circuit Basics
85
144
86
145
Circuits consist of at least one active electronic component, and consists of conductive material, such as wires, so that current can pass through. When working with an Arduino, you will in most cases build a circuit for your project.
87
146
88
147
A simple example of a circuit, is an **LED circuit**. A wire is connected from a pin on the Arduino, to an LED via a resistor (to protect the board), and to ground (GND). When the pin is set to a **HIGH state**, the LED will turn on, as electric current is flowing through the circuit. When the pin is set to a **LOW state**, the LED will turn off, as electric current is not flowing through the circuit.
89
148
90
-
![An LED circuit with an Arduino.]()
149
+

91
150
92
151
Circuits are typically drawn as **schematics**, which are the blueprints for your circuit. In the schematic below, you will see the same circuit as the one above, but drawn differently.
93
152
94
-
![Schematics of a circuit.]()
153
+

95
154
96
155
### Electronic Signals
97
156
98
157
All communication between any electronic components are done through **electronic signals.** There are two main types of electronic signals: **analog & digital**.
99
158
100
159
### Analog Signal
101
160
102
-
![Basics of an analog signal.]()
161
+

103
162
104
163
An analog signal is generally bound to a range. In an Arduino, that range is typically 0-5V, or 0-3.3V.
105
164
@@ -111,7 +170,7 @@ If we write an analog signal using Pulse-Width Modulation (PWM), we can use a ra
111
170
112
171
### Digital Signal
113
172
114
-
![Basics of a digital signal.]()
173
+

115
174
116
175
A digital signal works a bit different, and measures only if it is in a high, or low state (0 or 1). This is the most common signal type in modern technology.
117
176
@@ -147,7 +206,7 @@ Sensors can also take the form of just a simple button: when a state changes (we
147
206
148
207
There are many types of sensors, and several ways of recording data from them. Perhaps the easiest to use is an analog sensor, where we record the voltage input (usually between 0-5 volts). This simply gives you a range between 0-1023 (a 10-bit resolution).
149
208
150
-
Digital sensors are a bit more advanced, depending on the type. They rely on [Serial Communication Protocols]() to send the data accordingly, and requires a bit more effort to translate the data. As mentioned in the [Electronic Signals]() section above, data is sent using a binary sequence (e.g. `101101` is `45`), and this needs to be addressed and configured on a software level. Luckily, a lot of sensors are accompanied by **libraries**, which makes it a lot easier to read.
209
+
Digital sensors are a bit more advanced, depending on the type. They rely on [Serial Communication Protocols](#serial-communication-protocols) to send the data accordingly, and requires a bit more effort to translate the data. As mentioned in the [Electronic Signals](#electronic-signals) section above, data is sent using a binary sequence (e.g. `101101` is `45`), and this needs to be addressed and configured on a software level. Luckily, a lot of sensors are accompanied by **libraries**, which makes it a lot easier to read.
151
210
152
211
#### What Is an Actuator?
153
212
@@ -198,18 +257,15 @@ The Flash memory is primarily used to store the main program, or the instruction
198
257
199
258
### Embedded Components
200
259
201
-
![Embedded sensors.]()
260
+

202
261
203
262
An **embedded component** is a tiny component that is found on your board. As electronics are getting smaller and smaller, more and more can be fitted to smaller circuit boards.
204
263
205
264
Many new Arduino boards have sensors embedded directly, making them very compact. For example, the [Nano BLE Sense]() has 7 embedded sensors, but is only **45x18mm** (the size of a thumb). These are all connected via the I²C protocol as mentioned above, and has a unique address.
206
265
207
266
208
-
209
267
### Internet of Things (IoT)
210
268
211
-
![Wireless communication]().
212
-
213
269
Most modern Arduino boards now come equipped with a radio module, designed to communicate wirelessly. There are several different ones: Wi-Fi, Bluetooth, LoRa, GSM, NB-IoT and more. Each are designed to communicate using the various technologies available on the market.
214
270
215
271
The most popular and inexpensive modules are the Wi-Fi & Bluetooth modules. The Wi-Fi modules allow your board to connect to routers, and to request and send data over the Internet. In a way, it works the same as your computer when requesting various types of data over the Internet, just in a smaller scale.
@@ -220,7 +276,7 @@ Similarly to serial protocols, radio modules use their own set of protocols to c
220
276
221
277
## Arduino API
222
278
223
-
***Visit the [Arduino Language Reference]() to explore the full Arduino API.***
279
+
***Visit the [Arduino Language Reference](https://www.arduino.cc/reference/en/) to explore the full Arduino API.***
224
280
225
281
The Arduino API, aka the "Arduino Programming Language", consists of several functions, variables and structures based on the C/C++ language.
226
282
@@ -249,8 +305,6 @@ The above functions are **always** required in an Arduino sketch, but you are of
249
305
250
306
### The "Sketch"
251
307
252
-
![The Arduino Sketch.]()
253
-
254
308
In the Arduino project, a program is referred to as a "Sketch". A sketch is basically just a file that you write your program inside. It has the `.ino` extension, and is always stored in a folder of the same name.
255
309
256
310
The folder can include other files, such as a **header file**, that can be included in your sketch.
@@ -361,51 +415,61 @@ To upload code to an Arduino board using the IDE, one typically does the followi
361
415
362
416
### Arduino IDE 1.8.x
363
417
364
-
![The classic Arduino IDE.]()
418
+

365
419
366
420
For what is now considered the "legacy" editor, the Arduino IDE 1.8.X, or "Java IDE", is the editor that was first released back when Arduino started.
367
421
368
-
***Learn more by visiting the [Arduino IDE 1 documentation]().***
422
+
***Learn more by visiting the [Arduino IDE 1 documentation](/software/ide-v1)).***
369
423
370
424
### Arduino IDE 2.0.x
371
425
372
-
![The new Arduino IDE.]()
426
+

373
427
374
428
In 2021, the Arduino IDE 2.0 was released. The new IDE has the same functionality, but also supports features such as auto-completion and debugging.
375
429
376
-
***Learn more by visiting the [Arduino IDE 2 documentation]().***
430
+
***Learn more by visiting the [Arduino IDE 2 documentation](/software/ide-v2).***
431
+
432
+
### Arduino IoT Cloud
433
+
434
+

435
+
436
+
The [Arduino IoT Cloud](https://create.arduino.cc/iot/) allows you to configure, program and control/monitor your devices - all in one web based application. With the use of **things**, or your "digital twin", you can control and monitor variables directly from **dashboards**. The service also supports webhooks and integrations with other services, such as **Amazon Alexa.**
377
437
378
-
### Web Editor (Arduino Cloud)
438
+
The cloud is made for **anyone** to use, and it does not require much previous experience to get started.
379
439
380
-
![The Web Editor.]()
440
+
***Get started by reading the [Getting Started with the Arduino IoT Cloud](/cloud/iot-cloud/tutorials/iot-cloud-getting-started) guide, or visit the [full documentation](/cloud/iot-cloud).***
381
441
382
-
The Web Editor is an online IDE, part of the Arduino Cloud suite. Similar in function, this editor is completely web based, with online storage among other features.
442
+
###Web Editor
383
443
384
-
***Learn more by visiting the [Web Editor documentation]().***
444
+

445
+
446
+
The [Arduino Web Editor](https://create.arduino.cc/editor) is an online IDE, part of the Arduino Cloud suite. Similar in function, this editor is completely web based, with online storage among other features. To use the Web Editor, you will need to register an Arduino account.
447
+
448
+
***Learn more by visiting the [Web Editor documentation](/cloud/web-editor).***
385
449
386
450
### Library Manager
387
451
388
452
![The Library Manager.]()
389
453
390
454
Every version of the IDE has a library manager for installing Arduino software libraries. Thousands of libraries, both official and contributed libraries, are available for direct download. Code examples for each library is made available on download.
391
455
392
-
We will go through what a library is and how to use them, further down in the [Arduino API section]() of this article.
456
+
***To explore all available Arduino libraries, visit the [Arduino Libraries page](https://www.arduino.cc/reference/en/libraries/).***
393
457
394
458
### Arduino CLI
395
459
396
-
![The CLI (Command Line Interface).]()
460
+

397
461
398
462
The Arduino CLI is a command line tool that can be used to compile and upload code to your board. It has no visual UI, but is very useful for automation. It is designed for more advanced users.
399
463
400
464
A proper use of the CLI can speed up your development time by far, as any operation is executed much faster than in the regular IDE.
401
465
466
+
***To learn more, visit the [Arduino CLI documentation](https://arduino.github.io/arduino-cli/).***
402
467
403
468
## Quick Reference
404
469
405
470
In this section, you will find a list of some of the most common elements in the standard Arduino API. This will help you get familiar with some key building blocks.
406
471
407
-
To explore the whole Arduino API, please refer to the [Arduino Language Reference](), an in-depth wiki maintained by Arduino and its community.
408
-
472
+
To explore the whole Arduino API, please refer to the [Arduino Language Reference](https://www.arduino.cc/reference/en/), an in-depth wiki maintained by Arduino and its community. You will find hundreds of entries, accompanied by code examples and elaborate descriptions.
409
473
410
474
### General
411
475
@@ -800,11 +864,10 @@ x -= y; //x is now 3 (subtract and assign)
800
864
x *= y; //x is now 10 (multiply and assign)
801
865
```
802
866
803
-
804
867
## Conclusion
805
868
806
869
In this guide, we have touched upon some of the fundamentals of Arduino: hardware, software tools, what is the Arduino API, and a quick intro to it. This guide serves mainly as an introduction to Arduino, and understanding the fundamental concepts.
807
870
808
871
To learn more, you can explore the [Arduino Documentation](/) and the [Arduino Language Reference](https://www.arduino.cc/reference/en/), where you will discover thousands of detailed tutorials, examples, API entries and other resources.
809
872
810
-
To purchase an Arduino board, visit the [Arduino Store](https://store.arduino.cc/).
873
+
To purchase an Arduino board, visit the [Arduino Store](https://store.arduino.cc/).
0 commit comments