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
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The Arduino platform has since its start in 2005, grown to become one of the mos
9
9
10
10
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.
11
11
12
-
***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
+
***In this guide, you will gain an overview of the Arduino Ecosystem, and a set of links leading to more detailed articles.***
13
13
14
14
15
15
## Overview
@@ -18,7 +18,7 @@ This guide is divided into four main sections: **hardware**, **software tools**,
18
18
19
19
### Arduino Hardware
20
20
21
-
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
+
In this section, we will dedicate some time to learn about some fundamentals in electronics, and about the basic operation of an Arduino board.
22
22
23
23
-[Anatomy of an Arduino Board](#anatomy-of-an-arduino-board)
24
24
-[Basic Operation](#basic-operation)
@@ -74,22 +74,22 @@ While all Arduino boards differ from each other, there are several key component
74
74
75
75

76
76
77
-
-**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.
78
-
-**2.** USB port - used to connect a USB cable from your computer.
79
-
-**3.** USB to Serial chip - the USB to Serial is an important component, as it helps translate data that comes from e.g. a computer to the microcontroller. This is what makes it possible to program it from your computer.
80
-
-**4.** Digital pins - pins that uses digital logic (0,1 or LOW/HIGH). Commonly used for switches and to turn on an LED.
81
-
-**5.** Analog pins - pins that can read analog values in a 10 bit resolution (0-1023).
82
-
-**6.** 5V / 3.3V pins- these pins are used to power external components.
83
-
-**7.** GND - also known as `ground`, `negative` or simply `-`, is used to complete a circuit, where the electrical level is at 0 volt.
84
-
-**8.** VIN - stands for Voltage In, where you can connect external power supplies.
77
+
-**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.
78
+
-**2.****USB port** - used to connect your Arduino board to a computer.
79
+
-**3.****USB to Serial chip** - the USB to Serial is an important component, as it helps translating data that comes from e.g. a computer to the on-board microcontroller. This is what makes it possible to program the Arduino board from your computer.
80
+
-**4.****Digital pins** - pins that use digital logic (0,1 or LOW/HIGH). Commonly used for switches and to turn on/off an LED.
81
+
-**5.****Analog pins** - pins that can read analog values in a 10 bit resolution (0-1023).
82
+
-**6.****5V / 3.3V pins**- these pins are used to power external components.
83
+
-**7.****GND** - also known as `ground`, `negative` or simply `-`, is used to complete a circuit, where the electrical level is at 0 volt.
84
+
-**8.****VIN** - stands for Voltage In, where you can connect external power supplies.
85
85
86
-
Depending on the Arduino board, you will find many more components. Listed above are generally found on any Arduino board.
86
+
Depending on the Arduino board, you will find many more components. The items listed above are generally found on any Arduino board.
87
87
88
88
### Basic Operation
89
89
90
-
Most Arduino boards are designed to have a single program running on the microcontroller. This program can be designed to perform one single action, such as blinking an LED. It can also be designed to execute a hundred different actions in a cycle. The scope varies from program to program.
90
+
Most Arduino boards are designed to have a single program running on the microcontroller. This program can be designed to perform one single action, such as blinking an LED. It can also be designed to execute hundreds of actions in a cycle. The scope varies from one program to another.
91
91
92
-
The program that is loaded to the microcontroller will start execution as soon as it is powered. Every program has a function called a "loop". Inside the loop, you can for example:
92
+
The program that is loaded to the microcontroller will start execution as soon as it is powered. Every program has a function called "loop". Inside the loop function, you can for example:
93
93
94
94
- Read a sensor.
95
95
- Turn on a light.
@@ -102,27 +102,27 @@ The speed of a program is incredibly fast, unless we tell it to slow down. It de
102
102
103
103
### Circuit Basics
104
104
105
-
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.
105
+
Circuits consist of at least one active electronic component, and a 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.
106
106
107
-
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.
107
+
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 LED from high current), and finally to the ground pin (GND). When the pin is set to a **HIGH state**, the microcontroller on the Arduino board will allow an electric current to flow through the circuit, which turns on the LED. When the pin is set to a **LOW state**, the LED will turn off, as an electric current is not flowing through the circuit.
108
108
109
109

110
110
111
-
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.
111
+
Circuits are typically represented as **schematics**, which are the blueprints for your circuit. The image below shows the schematic's representation of the same circuit shown in the image above.
112
112
113
113

114
114
115
115
### Electronic Signals
116
116
117
-
All communication between any electronic components are done through**electronic signals.** There are two main types of electronic signals: **analog & digital**.
117
+
All communication between electronic components are facilitated by**electronic signals.** There are two main types of electronic signals: **analog & digital**.
118
118
119
119
### Analog Signal
120
120
121
121

122
122
123
123
An analog signal is generally bound to a range. In an Arduino, that range is typically 0-5V, or 0-3.3V.
124
124
125
-
If we for example use a potentiometer (an analog component used to change the resistance of a circuit), we can adjust this range (0-5V). In the program, this is represented in a range of 0-1023, which is a 10-bit resolution.
125
+
If we for example use a potentiometer (an analog component used to change the resistance of a circuit), we can manually adjust this range (0-5V). In the program, this is represented in a range of 0-1023, which is a 10-bit resolution.
126
126
127
127
If we write an analog signal using Pulse-Width Modulation (PWM), we can use a range between 0-255, as we are using an 8-bit resolution.
128
128
@@ -132,11 +132,11 @@ If we write an analog signal using Pulse-Width Modulation (PWM), we can use a ra
132
132
133
133

134
134
135
-
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.
135
+
A digital signal works a bit different, representing only two binary states (0 or 1) that are read as high or low states in the program. This is the most common signal type in modern technology.
136
136
137
-
You can easily write and read digital signals on an Arduino, and is very useful to read button states, or to turn something on or off.
137
+
You can easily read and write digital signals on an Arduino, which is useful to for example read button states, or to turn something on or off.
138
138
139
-
Digital signals might seem very basic (just 0 or 1 right), but are actually way more advanced. For example, we can create a sequence by sending a high or low state rapidly a number of times. This is known as a **binary sequence** or a **bitstream**.
139
+
Digital signals might seem very basic (just 0 or 1), but are actually way more advanced. For example, we can create a sequence by sending a high or low state rapidly a number of times. This is known as a **binary sequence** or a **bitstream**.
140
140
141
141
Let's take a look at two binary sequences:
142
142
@@ -162,9 +162,9 @@ When working with Arduino, it is important to understand **sensors** and **actua
162
162
163
163
A sensor, in simple terms, is used to *sense* its environment, meaning it records a physical parameter, for example temperature, and converts it into an electronic signal.
164
164
165
-
Sensors can also take the form of just a simple button: when a state changes (we press the button), the electronic signal is switched from low to high (0 to 1).
165
+
Sensors can also take the form of just a simple button: when a state changes (we pressed a button), the electronic signal is switched from low to high (0 to 1).
166
166
167
-
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).
167
+
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 communicate a range of values through altering the voltage input fed into an Arduino analog pin (usually between 0-5 volts). This simply gives you a range between 0-1023 (a 10-bit resolution).
168
168
169
169
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 **software libraries**, which makes it a lot easier to read.
170
170
@@ -184,7 +184,7 @@ An actuator, in simple terms, is used to *actuate* or *change a physical state*.
184
184
185
185
Actuators converts electric signals into e.g. radiant energy (light) or mechanical energy (movement).
186
186
187
-
How actuators are controlled really depends on what type of component we have. The most simple way is to simply turn something on/off, while more advanced is controlling the amount of voltage a component gets (i.e. the speed of a motor).
187
+
How actuators are controlled really depends on what type of component we have. The most simple way is to simply turn something on/off, while more advanced is controlling the amount of voltage a component receives (i.e. the speed of a motor).
188
188
189
189
To control actuators, it is common to use `digitalWrite()` and `analogWrite()`.
190
190
@@ -200,7 +200,7 @@ analogWrite(motor, 25); //set a motor to 10% of its capacity
200
200
201
201
Sensors and actuators, are typically referred to as **inputs and outputs**. When we write a program, it is common to construct conditionals that checks the state of a sensor, and decides whether it should actuate something.
202
202
203
-
A basic example of this is a **button** and an **LED**. We can write a conditional that checks if a button is pressed, we should turn on the LED, and to turn it off if the button is not pressed. In an Arduino program, it looks like this:
203
+
A basic example of this is a **button** and an **LED**. We can write a conditional that checks if a button is pressed, turn on the LED, and turn it off if the button is not pressed. In an Arduino program, it looks like this:
204
204
205
205
```arduino
206
206
int buttonState = digitalRead(buttonPin); //read and store the button state (0 or 1)
@@ -344,7 +344,7 @@ To use a library, you need to include it at the top of your code, as the example
344
344
#include <Library.h>
345
345
```
346
346
347
-
Most libraries also have a set of examples that can be
347
+
Most libraries also have a set of examples that are useful to get started with the library.
348
348
349
349
***You can browse through all official and contributed libraries in the [Arduino Libraries page](https://www.arduino.cc/reference/en/libraries/).***
350
350
@@ -356,7 +356,7 @@ For example, the classic [ArduinoCore-avr](https://github.com/arduino/ArduinoCor
356
356
357
357
Another example is the [ArduinoCore-mbed](https://github.com/arduino/ArduinoCore-mbed) package, which includes over 40 libraries, designed for specific board features, such as:
358
358
359
-
-**PDM** - used for sampling Audio from microphones onboard the Nano BLE Sense and Nano RP2040 Connect boards.
359
+
-**PDM** - used for sampling audio from microphones found onboard the Nano BLE Sense and Nano RP2040 Connect.
360
360
-**Ethernet** - for using the Ethernet functionalities of the Portenta Vision Shield.
361
361
-**GSM** - to access GSM functionalities on the Portenta Cat. M1/NB IoT GNSS Shield.
362
362
@@ -400,7 +400,7 @@ To upload code to an Arduino board using the IDE, one typically does the followi
400
400
401
401
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.
402
402
403
-
***Learn more by visiting the [Arduino IDE 1 documentation](/software/ide-v1)).***
403
+
***Learn more by visiting the [Arduino IDE 1 documentation](/software/ide-v1).***
0 commit comments