Skip to content

Commit 48886c8

Browse files
committed
Update getting-started-arduino.md
1 parent 92f70b5 commit 48886c8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Which in decimal format is:
152152
23667
153153
```
154154

155-
This is a clever way of sending large amounts of data from one point to the other, by rapidly turning ON or OFF something. This particular operation is quite complex, and this is just a basic explanation of how a digital signal works.
155+
This is a clever way of sending large amounts of data from one point to the other, by rapidly sending high & low signals. In order to interpret the data from the signals, we use [Serial Communication Protocols](#serial-communication-protocols).
156156

157157
### Sensors & Actuators
158158

@@ -203,10 +203,12 @@ Sensors and actuators, are typically referred to as **inputs and outputs**. When
203203
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:
204204

205205
```arduino
206-
if(button == HIGH){ //check if state is high (button is pressed)
206+
int buttonState = digitalRead(buttonPin); //read and store the button state (0 or 1)
207+
208+
if(buttonState == HIGH){ //check if state is high (button is pressed)
207209
digitalWrite(LED, HIGH) //turn on LED
208210
}
209-
else{
211+
else {
210212
digitalWrite(LED, LOW); //turn off LED
211213
}
212214
```
@@ -278,11 +280,11 @@ The absolute minimum requirement of an Arduino program is the use of two functio
278280
- `void setup()` - this function executes only once, when the Arduino is powered on. Here we define things such as the mode of a pin (input or output), the baud rate of serial communication or the initialization of a library.
279281
- `void loop()` - this is where we write the code that we want to execute over and over again, such as turning on/off a lamp based on an input, or to conduct a sensor reading every X second.
280282

281-
The above functions are **always** required in an Arduino sketch, but you are of course able to add several more functions, which is very useful for longer programs.
283+
The above functions are **always** required in an Arduino sketch, but you are of course able to add several more functions, which is useful for longer programs.
282284

283285
### The "Sketch"
284286

285-
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.
287+
In the Arduino project, a program is referred to as a "Sketch". A sketch is a file that you write your program inside. It has the `.ino` extension, and is always stored in a folder of the same name.
286288

287289
The folder can include other files, such as a **header file**, that can be included in your sketch.
288290

@@ -342,6 +344,8 @@ To use a library, you need to include it at the top of your code, as the example
342344
#include <Library.h>
343345
```
344346

347+
Most libraries also have a set of examples that can be
348+
345349
***You can browse through all official and contributed libraries in the [Arduino Libraries page](https://www.arduino.cc/reference/en/libraries/).***
346350

347351
### Core Specific API
@@ -855,4 +859,4 @@ To learn more, you can explore the [Arduino Documentation](/) and the [Arduino L
855859

856860
To purchase an Arduino board, visit the [Arduino Store](https://store.arduino.cc/).
857861

858-
To download a version of the Arduino IDE, visit the [Arduino Software page]().
862+
To download a version of the Arduino IDE, visit the [Arduino Software page](https://www.arduino.cc/en/software).

0 commit comments

Comments
 (0)