Skip to content

Commit 90e05ae

Browse files
authored
Merge branch 'main' into product-compliance13
2 parents c859bb9 + 3b62950 commit 90e05ae

File tree

41 files changed

+642
-315
lines changed

Some content is hidden

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

41 files changed

+642
-315
lines changed

.github/workflows/deploy-production.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ jobs:
5050
id: gatsby-cache-folder
5151
with:
5252
path: .cache
53-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
53+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
5454
restore-keys: |
55-
${{ runner.os }}-cache-gatsby-
55+
${{ runner.os }}-cache-gatsby-main
5656
5757
- name: Gatsby Public Folder
5858
uses: actions/cache@v4
5959
id: gatsby-public-folder
6060
with:
6161
path: public/
62-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
62+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
6363
restore-keys: |
64-
${{ runner.os }}-public-gatsby-
64+
${{ runner.os }}-public-gatsby-main
6565
6666
- run: npm install
6767
- run: npm run build
@@ -73,8 +73,18 @@ jobs:
7373
aws-region: us-east-1
7474

7575
- name: Sync all cacheable assets
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 }}/
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" --exclude="*.pdf" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
7777

7878
- name: Sync all non-cacheable assets
7979
# Don't cache any HTML or JSON file: they should always be up-to-dates
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 }}/
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" --exclude="*.pdf" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
81+
82+
- name: Sync PDF
83+
run: aws s3 sync --cache-control "public, max-age=86400, must-revalidate" --include "*.pdf" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.css" --exclude="*.html" --exclude="*.json" --exclude="sw.json" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
84+
85+
- name: Purge cache on CloudFlare
86+
run: |
87+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
88+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
89+
-H "Content-Type: application/json" \
90+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

.github/workflows/deploy-staging.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ jobs:
4949
id: gatsby-cache-folder
5050
with:
5151
path: .cache
52-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
52+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
5353
restore-keys: |
54-
${{ runner.os }}-cache-gatsby-
54+
${{ runner.os }}-cache-gatsby-main
5555
5656
- name: Gatsby Public Folder
5757
uses: actions/cache@v4
5858
id: gatsby-public-folder
5959
with:
6060
path: public/
61-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
61+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
6262
restore-keys: |
63-
${{ runner.os }}-public-gatsby-
63+
${{ runner.os }}-public-gatsby-main
6464
6565
- run: npm install
6666
- run: npm run build
@@ -72,8 +72,18 @@ jobs:
7272
aws-region: us-east-1
7373

7474
- name: Sync all cacheable assets
75-
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 }}/
75+
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" --exclude="*.pdf" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
7676

7777
- name: Sync all non-cacheable assets
7878
# Don't cache any HTML or JSON file: they should always be up-to-dates
79-
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 }}/
79+
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" --exclude="*.pdf" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
80+
81+
- name: Sync PDF
82+
run: aws s3 sync --cache-control "public, max-age=86400, must-revalidate" --include "*.pdf" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.css" --exclude="*.html" --exclude="*.json" --exclude="sw.json" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
83+
84+
- name: Purge cache on CloudFlare
85+
run: |
86+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
87+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
88+
-H "Content-Type: application/json" \
89+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

.github/workflows/preview.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ jobs:
6969
id: gatsby-cache-folder
7070
with:
7171
path: .cache
72-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
72+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
7373
restore-keys: |
74-
${{ runner.os }}-cache-gatsby-
74+
${{ runner.os }}-cache-gatsby-main
7575
7676
- name: Gatsby Public Folder
7777
uses: actions/cache@v4
7878
id: gatsby-public-folder
7979
with:
8080
path: public/
81-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
81+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
8282
restore-keys: |
83-
${{ runner.os }}-public-gatsby-
83+
${{ runner.os }}-public-gatsby-main
8484
8585
- run: npm install
8686
- run: npm run build
@@ -135,4 +135,4 @@ jobs:
135135
body: |
136136
## Preview Deployment
137137
🚀 Preview this PR: ${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}
138-
📍 Commit SHA: ${{ github.sha }}
138+
📍 Commit SHA: ${{ github.sha }}

.github/workflows/render-datasheets.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
1111

1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 18
1717
cache: "npm"
@@ -20,4 +20,5 @@ jobs:
2020
- name: Render
2121
run: |
2222
cd scripts/datasheet-rendering
23-
./render-datasheets.sh
23+
./render-datasheets.sh
24+
continue-on-error: true
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: 'Templates'
3+
description: 'Ready-made projects that can significantly lower the entry barrier for teaching and learning about IoT applications'
4+
difficulty: intermediate
5+
tags:
6+
- Cloud
7+
- Education
8+
- IoT Templates
9+
author: 'Lenard George, Hannes Siebeneicher'
10+
software:
11+
- iot-cloud
12+
---
13+
14+
## Introduction
15+
16+
This guide aims to introduce anyone interested in exploring the world of the Internet of Things (IoT) to Arduino Cloud Templates. These templates are pre-built projects that make it significantly easier to dive into IoT applications. Whether you're a teacher, a maker, planning your next class or organizing a hackathon, these templates provide a quick and accessible way to get started with the fundamental components of an IoT project.
17+
18+
## What you will learn
19+
20+
- Templates and their benefits
21+
- Collection of Arduino Templates
22+
- Importing Templates
23+
- Create Custom Templates
24+
25+
## Arduino Templates
26+
27+
<iframe width="100%" height="480" src="https://www.youtube-nocookie.com/embed/J5_QleCPc64?si=I-3lU1mVam3jtA4_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
28+
29+
Templates are pre-configured projects that allow users to quickly set up Arduino devices for the Arduino Cloud, creating a dashboard based on the project in two minutes. Through a [Dashboard](https://docs.arduino.cc/arduino-cloud/cloud-interface/dashboard-widgets), you can easily monitor and control IoT projects on a web interface.
30+
31+
Dashboards are an excellent way to learn about IoT concepts, data collection and analysis, and interaction with hardware/sensors without having to build an IoT project from scratch. This reduces the time and the learning curve, providing a starting point for building innovative ideas and deepening knowledge.
32+
33+
![Collection of templates](assets/sidebar.png)
34+
35+
## Setup
36+
37+
Once you have decided which template(s) you would like to use, it's important to prepare the essentials to conduct this activity effectively. Before you begin using templates, ensure that you have the following items checked:
38+
39+
- Hardware - Any choice of [Arduino Wi-Fi® boards](https://support.arduino.cc/hc/en-us/articles/4407129094546-Boards-and-shields-with-wireless-connectivity)
40+
41+
- USB Cable - Ensure you have the right one for your board
42+
43+
- Software - Arduino Account
44+
45+
- Good Internet Connection
46+
47+
- Collaborative Space (optional - useful if you're working in a group)
48+
49+
- Sensors and Actuators (optional)
50+
51+
For our tutorial, we will use the [Cloud Blink Template](https://app.arduino.cc/templates/cloud-blink) that will illustrate how to control an Arduino Board’s LED through a dashboard in the Arduino Cloud. This is a great template if you want to get started with the Arduino Cloud since it works with all boards. After you have completed the installation, you can modify the sketch and dashboard freely.
52+
53+
For troubleshooting, we recommend to read this article from our Help Center:
54+
55+
* [Configure your network for Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/360017279260-Configure-your-network-for-Arduino-Cloud)
56+
57+
## Choosing a template
58+
59+
Once you have logged into your account, Templates can be accessed from the sidebar **Templates > Arduino Templates** from the menu on top.
60+
61+
![Sidebar IoT Templates](assets/templatesexamples.jpg)
62+
63+
Here you will find templates across various categories and different boards. Click on the "Cloud Blink" Template.
64+
65+
![Cloud blink template](assets/select-cloud-blink.png)
66+
67+
The template page will open, where you will find the description of what the project does together with essential information on hardware and electronics components.
68+
69+
## Use a Template
70+
71+
Arduino Templates can be imported easily by clicking on the import button from the template description page. The process is similar to that of uploading a sketch to the Arduino board. Once the device is plugged in the USB port, click on **USE TEMPLATE** to import the chosen template. If you have not yet connected a device you will be guided to.
72+
73+
***Note: If this is your first time using the Arduino Cloud, you will be prompted to install the Create Agent. This software facilitates communication between your browser and Arduino board. Simply install it as you would any other program. For detailed instructions on installing the Create Agent, click [here](https://support.arduino.cc/hc/en-us/articles/360014869820-Install-the-Arduino-Create-Agent).***
74+
75+
![Import template button](assets/use-a-template.png)
76+
77+
Above the `Use Template` button, you can find information on how many [Things](https://docs.arduino.cc/arduino-cloud/cloud-interface/things), [Variables](https://docs.arduino.cc/arduino-cloud/cloud-interface/variables) and [Dashboards](https://docs.arduino.cc/arduino-cloud/cloud-interface/dashboard-widgets) are associated with this template. The Arduino Cloud platform will handle the creation of these IoT components along with setting up the device and network for the selected template.
78+
79+
![Unable to use Template](assets/not-enough.png)
80+
81+
***Note: with a Free Plan a user can only have two Things at same time. When you already have two Things, you won't be able to click on USE TEMPLATE. To avoid this you could choose to upgrade your Cloud plan or manually delete an existing Thing.***
82+
83+
![Template creation](assets/template-creation.png)
84+
85+
This process involves creating the necessary components and uploading the sketch (program) to your device:
86+
87+
1. Configure your Arduino hardware and add it to the Cloud platform,
88+
2. Create a virtual representation of your IoT setup,
89+
3. Assign the right network credentials to your devices,
90+
4. Build a dashboard with the right widgets.
91+
92+
***Note: The process may take up to 5 minutes. Do not unplug the device during this step or close the laptop during the import process.***
93+
94+
For troubleshooting, we recommend to read this article from our Help Center:
95+
96+
* [If your device can't be added or won't connect to Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/360019355679-If-your-device-can-t-be-added-or-won-t-connect-to-Arduino-Cloud)
97+
98+
Once connected, the template will become operational. For example, if using the "Cloud Blink" template, you can now control an LED remotely through the Cloud interface.
99+
100+
![Template Dashboard](assets/template-dashboard.png)
101+
102+
For troubleshooting, we recommend to read this article from our Help Center:
103+
104+
* ['We were not able to upload the template sketch' in Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/4408887422994--We-were-not-able-to-upload-the-template-sketch-in-Arduino-Cloud)
105+
106+
## Editing a Template
107+
108+
This interface is fully customizable and you can extend this template based on your needs and creativity. If you’d like to make changes to the `Dashboard` by adding additional widgets, you can do so by clicking on the **Edit icon**.
109+
110+
![Dashboard edit icon](assets/edit-icon.png)
111+
112+
Click on the **Add** to select a widget you would like to add.
113+
114+
![Add widget](assets/add-widget.png)
115+
116+
Once you have added the `Widget`, you can either connect it to the available `variables` or you can create a new variable. For this you need to go to **Things** from your sidebar and click on the Thing that **has the same name as your template**.
117+
118+
![Associated Thing](assets/associated-thing.png)
119+
120+
As mentioned earlier, a template also creates: **variables**, **sketch files**, **device** and **network information** that can be configured based on your preference. All this information can be found inside a **Thing**.
121+
122+
![Thing information](assets/thing-information.png)
123+
124+
If you have already worked with Arduino IoT projects, you can go ahead and start customizing the templates based on your choice, otherwise you can [get started reading this tutorial]( https://docs.arduino.cc/arduino-cloud/guides/overview/).
125+
126+
### Effective Classroom Learning with Templates
127+
128+
Integrating Arduino Templates into a course curriculum offers a tangible way to teach concepts like sensor data collection, cloud computing, and Internet of Things principles across various disciplines such as physics, chemistry, biology and computer science. Here are some innovative ways a teacher can use these templates in their course.
129+
130+
| Subject / Project | Physics | Chemistry | Biology | Comp. Science | Arts and Design |
131+
| ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
132+
| | | | | [Remote LED Control](https://app.arduino.cc/templates/cloud-blink) | [Fun and Games](https://app.arduino.cc/templates/pavlovs-cat) |
133+
| | [Thermodynamics](https://app.arduino.cc/templates/ventilation) | [Soil properties](https://app.arduino.cc/templates/soil-moist) | [Photosynthesis and respiration](https://app.arduino.cc/templates/photosynthesis) | [Greenhouse Monitoring](https://app.arduino.cc/templates/watering) | [UI Design of industrial systems](https://app.arduino.cc/templates/smart-garden) |
134+
| | | [Monitoring indoor air quality](https://app.arduino.cc/templates/thermostat-control) | [Studying indoor plant growth](https://app.arduino.cc/templates/natural-and-artificial-light) | [Introducing Sensor technology](https://app.arduino.cc/templates/remote-controlled-lights) | [Ideation and prototyping easy to use home projects](https://app.arduino.cc/templates/plant-watering-kit) |
135+
| | [Pressure, temperature and light](https://app.arduino.cc/templates/humidity-and-temperature) | | [Weather Stations](https://app.arduino.cc/templates/personal-weather-station) | [Basics of structuring data](https://app.arduino.cc/templates/sparkfun-weather-station) | |
136+
| | | | | [Loops, Pointers, Arrays and Functions](https://app.arduino.cc/templates/puzzle-box) | [Emotional expressions through technology](https://app.arduino.cc/templates/thinking-about-you) |
137+
138+
If you plan to use templates in a teaching environment or during a workshop with multiple participants, you might find [shared spaces](https://docs.arduino.cc/arduino-cloud/education/shared-spaces/) very useful. Make sure all participants have created their individual accounts and have been added to the shared space you have set up.
139+
140+
## Conclusion
141+
142+
Arduino Templates offer a practical and engaging way to introduce students to IoT technology. By guiding them through setting up, programming, and deploying IoT projects, educators can provide a hands-on learning experience that emphasizes the importance of IoT in today's technology-driven world. Encourage your students to explore, experiment, and innovate as they embark on their IoT learning journey.
143+
144+
145+
Loading
Loading

content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/arduino-cloud-cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Here's follows the FQBN's list of the supported devices:
128128

129129
### LoRaWAN® Devices
130130

131-
To configure LoRaWAN® devices, use the additional `create-lora` and the `--frequency-plan` flag. This
131+
To configure LoRaWAN® devices, use the additional `create-lora` and the `--frequency-plan` flag. This
132132

133133
```
134134
arduino-cloud-cli device create-lora --name <deviceName> --frequency-plan <freqID> --port <port> --fqbn <deviceFqbn>
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)