Skip to content

Commit 92f70b5

Browse files
committed
Update links & fix typos
1 parent 81d1782 commit 92f70b5

File tree

2 files changed

+47
-62
lines changed

2 files changed

+47
-62
lines changed
Loading

content/learn/01.starting-guide/00.getting-started-arduino/getting-started-arduino.md

Lines changed: 47 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Getting Started with Arduino
33
description: 'An introduction to hardware, software tools, and the Arduino API.'
4-
tags: [Arduino, API]
4+
author: 'Karl Söderby'
5+
tags: [Arduino, API, Signals, IDE, Quick Reference]
56
---
67

78
The Arduino platform has since its start in 2005, grown to become one of the most recognizable brands in the space of electronics and embedded design.
@@ -11,11 +12,11 @@ But what are the cornerstones of Arduino? What is a "board", how do I write code
1112
***In this guide, you will discover a lot of topics related to the Arduino Ecosystem, and links that lead to more in-depth articles.***
1213

1314

14-
## [Overview](#overview)
15+
## Overview
1516

1617
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:
1718

18-
### [Arduino Hardware](#arduino-hardware)
19+
### Arduino Hardware
1920

2021
In this section, we will dedicate some time to learn about some fundamentals in electronics, and about a basic operation of an Arduino board.
2122

@@ -31,7 +32,7 @@ In this section, we will dedicate some time to learn about some fundamentals in
3132
- [Embedded Components](#embedded-components)
3233
- [Internet of Things (IoT)](#internet-of-things-iot)
3334

34-
### [Arduino API](#arduino-api)
35+
### Arduino API
3536

3637
In this section you will learn what the Arduino API is, and how to create code that can run on your Arduino board.
3738

@@ -42,7 +43,7 @@ In this section you will learn what the Arduino API is, and how to create code t
4243
- [Libraries](#libraries)
4344
- [Core Specific API](#core-specific-api)
4445

45-
### [Arduino Software Tools](#arduino-software-tools)
46+
### Arduino Software Tools
4647

4748
In this section you will how to set up your development environment as well as learning about what options there are.
4849

@@ -54,7 +55,7 @@ In this section you will how to set up your development environment as well as l
5455
- [Library Manager](#library-manager)
5556
- [Arduino CLI](#arduino-cli)
5657

57-
### [Quick Reference](#quick-reference)
58+
### Quick Reference
5859

5960
The quick reference is an extract from the full Arduino API, containing popular functions, structures and methods.
6061

@@ -63,47 +64,6 @@ The quick reference is an extract from the full Arduino API, containing popular
6364
- [GPIO / Pin Management](#gpio--pin-management)
6465
- [Structure](#structure)
6566

66-
67-
68-
69-
## Overview
70-
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:
72-
73-
### [Hardware](#arduino-hardware)
74-
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.
76-
77-
- The anatomy of an Arduino board.
78-
- The "basic" operation of an Arduino board.
79-
- Fundamental knowledge of microcontrollers, electronic signals, communication protocols, memory management.
80-
- Embedded sensors.
81-
- Creating a circuit with external sensors and actuators.
82-
- Internet of Things (IoT) and different radio modules & wireless protocols.
83-
84-
### [Software IDE, Tools & Services](#arduino-software-tools)
85-
86-
In this section you will how to set up your development environment as well as learning about what options there are.s
87-
88-
- How to set up your development environment.
89-
- Learn about the Arduino IDEs (Integrated Development Environment).
90-
- Learn about the Arduino Cloud Service.
91-
- Intro to the Arduino CLI (Command Line Interface).
92-
93-
### [The Arduino API](#arduino-api)
94-
95-
In this section you will learn what the Arduino API is, and how to create code that can run on your Arduino board.
96-
97-
- What is the "Arduino API".
98-
- How is an Arduino program (sketch) structured.
99-
- How do I upload code to an Arduino board?
100-
- What is a "core/platform"?
101-
- Core specific API.
102-
103-
### [Quick Reference](#quick-reference)
104-
105-
- General
106-
10767
## Arduino Hardware
10868

10969
Over the years, Arduino has released hundreds of hardware designs in many shapes and forms.
@@ -196,17 +156,23 @@ This is a clever way of sending large amounts of data from one point to the othe
196156

197157
### Sensors & Actuators
198158

199-
When working with Arduino, it is important to understand **sensors** and **actuators**.
159+
When working with Arduino, it is important to understand **sensors** and **actuators**, and the difference between them.
200160

201161
#### What Is a Sensor?
202162

203-
A sensor, in simple terms, is used to *sense* its environment, meaning it records a physical parameter, for example temperature, and converts it into a signal.
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.
204164

205-
Sensors can also take the form of just a simple button: when a state changes (we press the button), and 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 press the button), the electronic signal is switched from low to high (0 to 1).
206166

207167
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).
208168

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.
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+
171+
In many cases, all we need is just one line of code:
172+
173+
```arduino
174+
sensorValue = sensor.read();
175+
```
210176

211177
#### What Is an Actuator?
212178

@@ -220,6 +186,16 @@ Actuators converts electric signals into e.g. radiant energy (light) or mechanic
220186

221187
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).
222188

189+
To control actuators, it is common to use `digitalWrite()` and `analogWrite()`.
190+
191+
```arduino
192+
digitalWrite(LED, HIGH); //turn on an LED
193+
digitalWrite(LED, LOW); //turn off an LED
194+
195+
analogWrite(motor, 255); //set a motor to maximum capacity
196+
analogWrite(motor, 25); //set a motor to 10% of its capacity
197+
```
198+
223199
#### Input & Output
224200

225201
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.
@@ -253,24 +229,25 @@ The SRAM (Static Random-Access Memory) is used to for example store the value of
253229

254230
The Flash memory is primarily used to store the main program, or the instructions for the microcontroller. This memory is not erased when powered off so that the instructions for the microcontroller are executed as soon as the board is powered.
255231

232+
How much memory is available on an Arduino varies from board to board. For example the **Arduino UNO** has a 32kB flash / 2kB SRAM, while a **Nano 33 IoT** has 256kB flash / 32kB SRAM. You will find this information in each of the product's documentation pages, which are available in the [Arduino Hardware Documentation](/).
233+
256234
***To learn more about memory on an Arduino, visit the [Arduino Memory Guide](/learn/programming/memory-guide).***
257235

258-
### Embedded Components
236+
### Embedded Sensors
259237

260238
![An IMU (Inertial Measurement Unit) on the Nano RP2040 Connect board.](assets/embedded-sensor.png)
261239

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.
263-
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.
265-
240+
Many new Arduino boards come equipped with **embedded sensors**. For example, the [Nano BLE Sense](https://store.arduino.cc/products/arduino-nano-33-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.
266241

267242
### Internet of Things (IoT)
268243

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.
244+
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.
245+
246+
![The u-blox NINA-W102 Wi-Fi / Bluetooth® module on the Nano RP2040 Connect board.](assets/wifi-bt-module.png)
270247

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.
248+
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.
272249

273-
Bluetooth is used to communicate with nearby devices, and is really useful for maintaining a fast and reliable connection. For example, in real-life applications, Bluetooth is used for wireless headphones & speakers.
250+
Bluetooth® is used to communicate with nearby devices, and is really useful for maintaining a fast and reliable connection. For example, in real-life applications, Bluetooth® technologty for example used in wireless headphones & speakers.
274251

275252
Similarly to serial protocols, radio modules use their own set of protocols to communicate, such as HTTP, MQTT and UPD.
276253

@@ -449,7 +426,7 @@ The [Arduino Web Editor](https://create.arduino.cc/editor) is an online IDE, par
449426

450427
### Library Manager
451428

452-
![The Library Manager.]()
429+
![Library manager on IDE 1.8.x and IDE 2.0.x](assets/lib-manager.png)
453430

454431
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.
455432

@@ -680,10 +657,16 @@ void loop() {
680657
}
681658
```
682659

683-
#### `Serial.available()`
684-
685660
#### `Serial.read()`
686661

662+
Reads the incoming serial data.
663+
664+
```arduino
665+
void loop() {
666+
int incomingByte = Serial.read();
667+
}
668+
```
669+
687670
### GPIO / Pin Management
688671

689672
Configuring, controlling and reading the state of a digital/analog pin on an Arduino.
@@ -871,3 +854,5 @@ In this guide, we have touched upon some of the fundamentals of Arduino: hardwar
871854
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.
872855

873856
To purchase an Arduino board, visit the [Arduino Store](https://store.arduino.cc/).
857+
858+
To download a version of the Arduino IDE, visit the [Arduino Software page]().

0 commit comments

Comments
 (0)