Skip to content

Commit 39d5a14

Browse files
committed
2 parents fedd30a + f2c283c commit 39d5a14

File tree

4 files changed

+38
-11
lines changed

4 files changed

+38
-11
lines changed
Loading

content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,35 @@ author: Karl Söderby
88
A sketch is a file where we write programs to run on our Arduino boards. Sketches have a `.ino` extension, which supports the Arduino programming language (a variant of C++).
99

1010
The Arduino Cloud has two categories of sketches:
11-
- **Regular sketch** - a single `.ino` file where you write a program. These sketches can be used for **any** Arduino board.
12-
- **IoT Sketch** - a set of files that are automatically generated when creating a [Thing](/arduino-cloud/cloud-interface/things). This includes an `.ino` file and two header (`.h`) files that contain your Thing configuration + credentials. Only available for boards with IoT support.
11+
- **Sketch** - a single `.ino` file where you write a program. These sketches can be used for **any** Arduino board.
12+
- **Sketch with attached Thing** - a set of files that are automatically generated when creating a [Thing](/arduino-cloud/cloud-interface/things). This includes an `.ino` file and two header (`.h`) files that contain your Thing configuration + credentials. Only available for boards with Arduino Cloud support.
1313

14-
In this document we will take a look at how to use sketches in the Arduino Cloud environment.
14+
In this document, we will take a look at how to use sketches in the Arduino Cloud environment.
1515

1616
***If you need help getting started with programming your Arduino in the online environment, check out the [Cloud Editor](/arduino-cloud/guides/cloud-editor) tutorial.***
1717

1818
## Access Your Sketches
1919

20-
You can access all your sketches at [app.arduino.cc/sketches](https://app.arduino.cc/sketches), where you can easily select between your regular sketches and IoT sketches.
20+
You can access all your sketches at [app.arduino.cc/sketches](https://app.arduino.cc/sketches). Here you can easily see if your sketch has a Thing connected to it by checking if it has a light blue text box next to it.
2121

22-
![Sketches in the Arduino Cloud.](assets/sketch.png)
22+
![Sketches in the Arduino Cloud](./assets/sketch.png)
2323

2424
Clicking on each sketch will direct you to the [Cloud Editor](https://create.arduino.cc/editor/), which is an online version of the Arduino IDE. Here you can write a program, compile it and upload it to your board.
2525

2626
***To get started with the Cloud Editor, check out the [Cloud Editor](/arduino-cloud/guides/cloud-editor) tutorial.***
2727

28+
### How to Create and Organize Folders
29+
30+
You can easily organize your sketches by creating folders. Here’s how you can do it:
31+
32+
**Create a New Folder**: Click on **Create**, then select **New Folder**.
33+
34+
**Move Sketches into a Folder**:
35+
36+
- **Drag and Drop**: Simply drag the sketch you want to move and drop it into the desired folder.
37+
38+
- **Right-Click and Move**: Alternatively, click the three dots on the right, choose the option "Move to folder", and then select the folder you want to move it to.
39+
2840
## Regular Sketches
2941

3042
A regular sketch in the Arduino Cloud is exactly like a sketch used in the [Arduino IDE](/software/ide-v2), with no difference whatsoever. You can take a sketch from the online IDE and compile it in the offline IDE.
@@ -45,11 +57,11 @@ If you are new to the Arduino environment, you can check out the [Language Refer
4557

4658
For specific features of a board, make sure to check out the [hardware documentation](/).
4759

48-
## IoT Sketches
60+
## Sketches with an attached Thing
4961

50-
IoT sketches are more complex and are generated automatically when you create a Thing and variables.
62+
Sketches with an attached Thing are more complex and are generated automatically when you create a Thing and variables.
5163

52-
***Read more about this in the [Automatic Sketch Generation](/arduino-cloud/cloud-interface/sketches) documentation.***
64+
***Read more about [Things](/arduino-cloud/cloud-interface/things/).***
5365

5466
### Sketch File
5567

@@ -122,13 +134,13 @@ The Remote Sketchbook feature is great as you can push/pull your sketches from t
122134
***A very important note on Remote Sketchbook: when you push/pull a sketch, you will overwrite the existing sketch, similarly to how GitHub works, but without the option of retrieving your previous sketch.***
123135

124136

125-
## Recommended Code Practices (IoT Sketches)
137+
## Recommended Code Practices (Sketches with an attached Thing)
126138

127139
This section highlights some important aspects of writing code with regard to the implementations in the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud).
128140

129141
### Watchdog Timer (WDT)
130142

131-
All Arduino Cloud sketches use a **Watchdog Timer (WDT)** by default. The WDT can be used to automatically recover from hardware faults or unrecoverable software errors.
143+
Arduino Cloud sketches use a **Watchdog Timer (WDT)** by default, however, not all boards support this function. The WDT can be used to automatically recover from hardware faults or unrecoverable software errors.
132144

133145
A WDT is essentially a countdown timer, whereas it starts counting from a set value, and upon reaching zero, it resets the board. To prevent it from reaching zero, we continuously call it from the `loop()`, using the `ArduinoCloud.update()` function.
134146

@@ -140,7 +152,7 @@ The WDT can however be disabled inside of the `setup()` function, by adding the
140152
ArduinoCloud.begin(ArduinoIoTPreferredConnection, false).
141153
```
142154

143-
***You can view the source code of this implementation [here](https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master/src/utility/watchdog).***
155+
***You can view the source code of this implementation [here](https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master/src/utility/watchdog) and you can check if your board supports this feature [here](https://github.com/arduino-libraries/ArduinoIoTCloud?tab=readme-ov-file#what).***
144156

145157
### Alternatives to Delays
146158

Loading

content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,21 @@ An example of how it is used in a sketch:
336336
locationVariable = Location(51.5074, 0.1278);
337337
```
338338

339+
### Advanced Map
340+
341+
![Advanced Map Widget](assets/widget-advanced-map.png)
342+
343+
The advanced map widget allows you to track the location of your cloud-connected device. Using GPS within your project allows the advanced map widget to track where the linked thing has been. This widget not only shows the live location of your device but also lets you specify a time frame to view its location history and the track it produced.
344+
345+
It can be linked with the **Location** variable. When the location updates the new location will be added to the advanced map widget and a path between the locations will be marked. The path and icon on the map can be customized in the widget settings.
346+
347+
An example of how it is used in a sketch:
348+
349+
```arduino
350+
//Location(Latitude, Longitude);
351+
locationVariable = Location(51.5074, 0.1278);
352+
```
353+
339354
### Chart
340355

341356
![Chart Widget](assets/widget-chart.png)

0 commit comments

Comments
 (0)