Skip to content

Commit 73c4c7d

Browse files
authored
Merge branch 'main' into mcmchris/opta/user-manual-analog-exp-section
2 parents afa5459 + 1fe97c1 commit 73c4c7d

File tree

172 files changed

+2057
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+2057
-515
lines changed

.github/workflows/deploy-prd.yml renamed to .github/workflows/deploy-production.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to production
1+
name: Deploy to docs-content.arduino.cc
22

33
on:
44
workflow_dispatch:
@@ -10,10 +10,15 @@ concurrency:
1010
group: deploy-production
1111
cancel-in-progress: true
1212

13+
permissions:
14+
id-token: write
15+
contents: read
16+
1317
jobs:
1418
build:
1519
if: "github.repository == 'arduino/docs-content'"
1620
runs-on: ubuntu-latest
21+
environment: production
1722
env:
1823
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
1924
APP_ENV: prod
@@ -33,11 +38,12 @@ jobs:
3338

3439
- name: Copy Static Files
3540
run: |
36-
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
41+
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts static/resources/models
3742
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
3843
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
3944
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
4045
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
46+
find ./content/hardware -type f -name "*-step.zip" -exec cp {} ./static/resources/models/ \;
4147
4248
- name: Gatsby main cache
4349
uses: actions/cache@v4
@@ -60,16 +66,15 @@ jobs:
6066
- run: npm install
6167
- run: npm run build
6268

63-
- name: Configure AWS Credentials
64-
uses: aws-actions/configure-aws-credentials@v1
69+
- name: Configure AWS credentials from Production account
70+
uses: aws-actions/configure-aws-credentials@v4
6571
with:
66-
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
67-
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
68-
aws-region: us-west-1
72+
role-to-assume: ${{ secrets.PRODUCTION_IAM_ROLE }}
73+
aws-region: us-east-1
6974

7075
- name: Sync all cacheable assets
71-
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.PROD_AWS_S3_BUCKET_NAME }}/
76+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
7277

7378
- name: Sync all non-cacheable assets
7479
# Don't cache any HTML or JSON file: they should always be up-to-dates
75-
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.PROD_AWS_S3_BUCKET_NAME }}/
80+
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/

.github/workflows/deploy-stg.yml renamed to .github/workflows/deploy-staging.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to docs.oniudra.cc
1+
name: Deploy to docs-content.oniudra.cc
22

33
on:
44
workflow_dispatch:
@@ -10,9 +10,14 @@ concurrency:
1010
group: deploy-staging
1111
cancel-in-progress: true
1212

13+
permissions:
14+
id-token: write
15+
contents: read
16+
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
20+
environment: staging
1621
env:
1722
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
1823
APP_ENV: staging
@@ -33,11 +38,12 @@ jobs:
3338

3439
- name: Copy Static Files
3540
run: |
36-
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
41+
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts static/resources/models
3742
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
3843
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
3944
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
4045
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
46+
find ./content/hardware -type f -name "*-step.zip" -exec cp {} ./static/resources/models/ \;
4147
4248
- name: Gatsby main cache
4349
uses: actions/cache@v4
@@ -60,16 +66,15 @@ jobs:
6066
- run: npm install
6167
- run: npm run build
6268

63-
- name: Configure AWS Credentials
64-
uses: aws-actions/configure-aws-credentials@v1
69+
- name: Configure AWS credentials from Staging account
70+
uses: aws-actions/configure-aws-credentials@v4
6571
with:
66-
aws-access-key-id: ${{ secrets.STAG_AWS_ACCESS_KEY_ID }}
67-
aws-secret-access-key: ${{ secrets.STAG_AWS_SECRET_ACCESS_KEY }}
68-
aws-region: us-west-1
72+
role-to-assume: ${{ secrets.STAGING_IAM_ROLE }}
73+
aws-region: us-east-1
6974

7075
- name: Sync all cacheable assets
71-
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.STAG_AWS_S3_BUCKET_NAME }}/
76+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
7277

7378
- name: Sync all non-cacheable assets
7479
# Don't cache any HTML or JSON file: they should always be up-to-dates
75-
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.STAG_AWS_S3_BUCKET_NAME }}/
80+
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/

.github/workflows/preview.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
issue-number: ${{ github.event.pull_request.number }}
3434
comment-author: "github-actions[bot]"
3535
body-includes: "Preview Deployment"
36-
36+
3737
- name: Update Comment if exists
3838
if: github.event_name == 'pull_request' && steps.deploy-preview-comment.outputs.comment-id != 0
3939
uses: peter-evans/[email protected]
@@ -57,11 +57,12 @@ jobs:
5757

5858
- name: Copy Static Files
5959
run: |
60-
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
60+
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts static/resources/models
6161
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
6262
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
6363
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
6464
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
65+
find ./content/hardware -type f -name "*-step.zip" -exec cp {} ./static/resources/models/ \;
6566
6667
- name: Gatsby main cache
6768
uses: actions/cache@v4
@@ -107,7 +108,7 @@ jobs:
107108
--auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \
108109
--json \
109110
> deploy_output.json
110-
111+
111112
- name: Generate URL Preview
112113
if: github.event_name == 'pull_request'
113114
id: url_preview
@@ -124,7 +125,7 @@ jobs:
124125
## Preview Deployment
125126
🚀 Preview this PR: ${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}
126127
📍 Commit SHA: ${{ github.sha }}
127-
128+
128129
- name: Update PR Preview Comment
129130
if: github.event_name == 'pull_request' && steps.deploy-preview-comment.outputs.comment-id != 0
130131
uses: peter-evans/[email protected]

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ node_modules
77
public
88
src
99
.DS_Store
10-
.vscode/settings.json
10+
.vscode/settings.json
11+
content/en
12+
content/de
13+
content/pt

content/_dev-test/content.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
id: ""
3+
title: ""
4+
categories: ""
5+
subCategories: ""
6+
leaf: false
7+
mainDescription: ""
8+
mainTitle: ""
9+
---

content/arduino-cloud/02.hardware/05.cellular/cellular.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ A number of Arduino boards are able to connect to the Arduino Cloud using a sim
1717

1818
Connection through cellular networks can be considered in remote areas where there's no Wi-Fi, or in mobile projects (such as cargo tracking).
1919

20-
***For more information, visit the [Arduino SIM page](https://store.arduino.cc/digital/sim).***
21-
2220
***Note that a secured connection is a memory intense operation, so there's not a lot of memory for the user application (e.g. around 2.6 kB on the MKR GSM 1400). Using a lot of Arduino Cloud variables may cause the sketch to run out of memory on boards which don't offload the SSL stack and make it crash.***
2321

2422
## Setup
@@ -36,12 +34,3 @@ To configure a cellular board, follow the steps below:
3634
Your board is now configured and ready to be used in the Arduino Cloud.
3735

3836
To get started, check out the official [Getting Started (Arduino / C++)](/arduino-cloud/guides/arduino-c) guide. This will guide you to successfully send data between your board and Arduino Cloud.
39-
40-
## Network Configuration
41-
42-
When you attach your board to a Thing, you will need to enter some credentials. With an Arduino SIM, configure it as:
43-
44-
- **APN** - `prepay.pelion`
45-
- **PIN** - `0000`
46-
- **Username** - `arduino`
47-
- **Password** - `arduino`
-1.12 MB
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

1.11 MB
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)