Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 9b021eb

Browse files
authored
Migrate to Frontmatter (#101)
* Migrate metadata to frontmatter * Change abstract property to description * Adjust validation for frontmatter
1 parent bc1201a commit 9b021eb

File tree

35 files changed

+186
-256
lines changed

35 files changed

+186
-256
lines changed

content/tutorials/portenta-h7/por-ard-ap/content.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: Portenta H7 as a Wi-Fi Access Point
3+
coverImage: assets/por_ard_ap_cover.svg
4+
tags: [WiFi, Access Point, HTTP, Web Server]
5+
description: In this tutorial you will configure the Portenta H7 as an access point and build a simple web server that will allow you to control the built-in RGB LEDs from your mobile device.
6+
---
7+
18
# Portenta H7 as a Wi-Fi Access Point
29

310
## Overview
@@ -21,14 +28,14 @@ When the board is configured to operate as an access point, it can create its o
2128

2229
With the access point set up you create a client server architecture where the board provides a web server communicating with the client devices over HTTP. The connected devices can then make HTTP GET requests to the server to retrieve web pages served by the web server on the board. This makes the Portenta H7 an ideal board for developing IoT solutions where external client devices can send and receive information while more complex processing tasks take place on the server.
2330

24-
![A client device communicating with the Portenta H7 through HTTP ](assets/por_ard_ap_tutorial_core_topic.svg?sanitize=true)
31+
![A client device communicating with the Portenta H7 through HTTP ](assets/por_ard_ap_tutorial_core_topic.svg)
2532

2633
## Instructions
2734

2835
### Setting Up the Web Server
2936
In this tutorial you are going to convert the board into an access point and use it to set up a web server which provides a HTML webpage. This page contains buttons to toggle the red, green and blue colour of the built-in LED. You will then connect your mobile device to this access point and access this web page through the browser on your mobile phone. Once retrieved, you will be able to control the state of the red, green and blue LED on the built-in RGB LED from your mobile device.
3037

31-
![A mobile device controlling the different LEDs on the board ](assets/por_ard_ap_tutorial_overview.svg?sanitize=true)
38+
![A mobile device controlling the different LEDs on the board ](assets/por_ard_ap_tutorial_overview.svg)
3239

3340
### 1. The Basic Setup
3441
Begin by plugging in your Portenta board to your computer using a USB-C cable and open the Arduino IDE or the Arduino Pro IDE. If this is your first time running Arduino sketch files on the board, we suggest you check out how to [set up the Portenta H7 for Arduino](https://www.arduino.cc/pro/tutorials/portenta-h7/por-ard-gs) before you proceed.
@@ -214,19 +221,19 @@ This sketch describes how the server will handle an incoming HTTP GET request fr
214221
215222
Here the web page is just a simple HTML page with buttons to toggle the LED states. The way in which the web page works is: Whenever a button on the web page is pressed, the client device (in this case your phone) sends a HTTP GET request to a URL denoted by a letter, in this case H or L (H stands for HIGH, L stands for LOW) followed by the LED color that should be turned on or off r, g or b. For example to turn on the red LED the URL is /Hr . Once the server receives this request it changes the corresponding LED state, closes the connection and continues to listen to next requests.
216223
217-
![The sequence of actions in the tutorial’s client-server model](assets/por_ard_ap_sketch_explanation.svg?sanitize=true)
224+
![The sequence of actions in the tutorial’s client-server model](assets/por_ard_ap_sketch_explanation.svg)
218225
219226
***Remember that the built-in RGB LEDs on the Portenta H7 need to be pulled to ground to make them light up. This means that a voltage level of __LOW__ on each of their pins will turn the specific color of the LED on, a voltage level of __HIGH__ will turn them off.***
220227
221228
### 3. Create the arduino_secrets.h Tab
222229
223230
A good practice is to have sensitive data like the SSID and the password required to identify and connect to a certain network within a separate file. Click on the arrow icon below the Serial Monitor button and open a new tab in the Arduino IDE. This will create a new file.
224231
225-
![Open a new tab in the IDE](assets/por_ard_ap_new_tab.png?sanitize=true)
232+
![Open a new tab in the IDE](assets/por_ard_ap_new_tab.png)
226233
227234
Name the file **arduino_secrets.h** and click OK.
228235
229-
![Naming the new tab arduino_secrets.h in the IDE](assets/por_ard_ap_new_tab_name.png?sanitize=true)
236+
![Naming the new tab arduino_secrets.h in the IDE](assets/por_ard_ap_new_tab_name.png)
230237
231238
Once you’ve created the new tab, you will see an empty page in the IDE. Define two constants `SECRET_SSID` and `SECRET_PASS` that will hold the name of the Wi-Fi network and the corresponding password. Add the following lines to your **arduino_secrets.h** file:
232239
@@ -243,31 +250,31 @@ In order to access the `SECRET_SSID` and `SECRET_PASS` constants in the **simple
243250
# include “arduino_secrets.h”
244251
```
245252

246-
![Including the header file arduino_secrets.h in the sketch file](assets/por_ard_ap_add_headerfile.png?sanitize=true)
253+
![Including the header file arduino_secrets.h in the sketch file](assets/por_ard_ap_add_headerfile.png)
247254

248255
### 4. Upload the Code
249256

250257
Select the **Arduino Portenta H7 (M7 core)** from the **Board** menu and the port the Portenta is connected to. Upload the **simpleWebServer.ino** sketch. Doing so will automatically compile the sketch beforehand.
251258

252-
![Uploading the SimpleWebServer.ino to the Portenta](assets/por_ard_ap_upload_code_m7.png?sanitize=true)
259+
![Uploading the SimpleWebServer.ino to the Portenta](assets/por_ard_ap_upload_code_m7.png)
253260

254261
Once you've uploaded the code, open the serial monitor. You will be able to see the IP address of the access point. You will also see the message, `Device disconnected from AP` which means there are no devices connected to the Access point yet.
255262

256-
![Serial monitor displaying the details of the Access point](assets/por_ard_ap_open_serial_monitor.png?sanitize=true)
263+
![Serial monitor displaying the details of the Access point](assets/por_ard_ap_open_serial_monitor.png)
257264

258265
### 5. Connecting to the Portenta Access Point
259266

260267
Once the access point is active and ready to be connected with external devices, you will be able to find the **PortentaAccessPoint** on the list of networks on your mobile device. Once you have entered the password you have defined earlier, your smart phone will connect to access point.
261268

262-
![PortentaAccessPoint shown on the list of available network devices](assets/por_ard_ap_find_ap.png?sanitize=true)
269+
![PortentaAccessPoint shown on the list of available network devices](assets/por_ard_ap_find_ap.png)
263270

264271
Now open a browser window on your mobile device and copy & paste the URL containing Portenta’s IP address that is displayed on the serial monitor.
265272

266-
![The URL containing the IP address of the access point displayed in the serial monitor](assets/por_ard_ap_copy_ip_address.png?sanitize=true)
273+
![The URL containing the IP address of the access point displayed in the serial monitor](assets/por_ard_ap_copy_ip_address.png)
267274

268275
Once you’ve entered the URL, the client sends a GET request to the web server to fetch the HTML web page specified in the code. Once loaded you will see the web page in your mobile browser.
269276

270-
![The HTML web page accessed on your mobile browser](assets/por_ard_ap_access_webpage.png?sanitize=true)
277+
![The HTML web page accessed on your mobile browser](assets/por_ard_ap_access_webpage.png)
271278

272279
### 6. Access the Board From Your Mobile Device
273280

@@ -285,11 +292,11 @@ HTTP/1.1 200 OK
285292

286293
Once the server has responded to this request, it closes the connection and continues listening to next GET requests.
287294

288-
![The client details displayed on the serial monitor](assets/por_ard_ap_client_details.png?sanitize=true)
295+
![The client details displayed on the serial monitor](assets/por_ard_ap_client_details.png)
289296

290297
You’re now be able to toggle the states of the red, green and blue LED through the buttons displayed on your mobile browser. Everytime you press a button, the client sends a GET request to a URL in the format /Hx or /Lx ,where x can be ‘r’, ‘g’ or ‘b’, depending on the button pressed on the HTML page. The web server then reads the URL requested by the client, changes the state of the LED corresponding to the URL and closes the connection.
291298

292-
![The GET request details displayed in the serial monitor](assets/por_ard_ap_toggle_LEDS.png?sanitize=true)
299+
![The GET request details displayed in the serial monitor](assets/por_ard_ap_toggle_LEDS.png)
293300

294301
## Conclusion
295302

content/tutorials/portenta-h7/por-ard-ap/metadata.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

content/tutorials/portenta-h7/por-ard-bl/content.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: Updating the Portenta Bootloader
3+
coverImage: assets/por_ard_bl_cover.svg
4+
tags: [Bootloader, Firmware, Core]
5+
description: This tutorial will explain what a bootloader is, why you should consider keeping it updated and how you can update it.
6+
---
7+
18
# Updating the Portenta Bootloader
29

310
## Overview

content/tutorials/portenta-h7/por-ard-bl/metadata.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

content/tutorials/portenta-h7/por-ard-ble/content.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: BLE Connectivity on Portenta H7
3+
coverImage: assets/por_ard_ble_cover.svg
4+
tags: [BLE, LED, Connectivity, Bluetooth]
5+
description: This tutorial explains how to use BLE connectivity on the Portenta H7 to control the built-in LED using an external Bluetooth application.
6+
---
7+
18
# BLE Connectivity on Portenta H7
29

310
## Overview
@@ -24,19 +31,19 @@ The onboard WiFi/Bluetooth® module of the H7 offers low energy Bluetooth® func
2431
### Configuring the Development Environment
2532
To communicate with the Portenta H7 via Bluetooth®, we are going to start by uploading a pre-built sketch that starts a Bluetooth® network and allows your mobile device, which will be used to control the LEDs, to connect to it. The sketch uses the [ArduinoBLE](https://www.arduino.cc/en/Reference/ArduinoBLE) Library that enables the BLE module and handles important functions such as scanning, connecting and interacting with services provided by other devices. You will also be using a third party application (e.g. [nRF Connect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile)), running on your mobile device that will connect your device to the board and help you control the built-in LED.
2633

27-
![BLE Configuration Scheme](assets/por_ard_ble_configuration.svg?sanitize=true)
34+
![BLE Configuration Scheme](assets/por_ard_ble_configuration.svg)
2835

2936
### 1. The Basic Setup
3037

3138
Begin by plugging in your Portenta board to the computer using a USB-C cable and open the Arduino IDE or the Arduino Pro IDE. If this is your first time running Arduino sketch files on the board, we suggest you check out how to [set up the Portenta H7 for Arduino](https://www.arduino.cc/pro/tutorials/portenta-h7/por-ard-gs) before you proceed.
3239

33-
![The Portenta H7 can be connected to the computer using an appropriate USB-C cable](assets/por_ard_ble_basic_setup.svg?sanitize=true)
40+
![The Portenta H7 can be connected to the computer using an appropriate USB-C cable](assets/por_ard_ble_basic_setup.svg)
3441

3542
### 2. Install the ArduinoBLE Library
3643

3744
You will need to install the ArduinoBLE library in the Arduino IDE you are using. For this example we will use the classic Arduino IDE. To install the library go to : **Tools -> Manage Libararies...** type **ArduinoBLE** and click **Install**. Make sure you install ArduinoBLE version 1.1.3 or higher.
3845

39-
![Download the BLE library in the Library Manager.](assets/por_ard_ble_arduino_library.png?sanitize=true)
46+
![Download the BLE library in the Library Manager.](assets/por_ard_ble_arduino_library.png)
4047

4148

4249

content/tutorials/portenta-h7/por-ard-ble/metadata.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

content/tutorials/portenta-h7/por-ard-dcp/content.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: Dual Core Processing
3+
coverImage: assets/por_ard_dcp_cover.svg
4+
tags: [Multitasking, RGB, LED]
5+
description: In this tutorial you will run two classic Arduino blink programs simultaneously on different cores of the Portenta board that blinks the RGB LED in two different colours.
6+
---
7+
18
# Dual Core Processing
29

310
## Overview
@@ -17,19 +24,19 @@ The Portenta H7 is equipped with a processor that has two processing units calle
1724
## Cortex® M7 & M4
1825
Processor cores are individual processing units within the board's main processing unit (don't confuse a processor core with an [Arduino core](https://www.arduino.cc/en/guide/cores)). These cores are responsible for the executing instructions at a particular clock speed.  The on-board  Arm Cortex processor comes with two cores (Cortex® M7 and M4), with slightly different architectures and clock speeds. The M7  runs at 480 MHz and the architecture is designed  to separate Instruction and Data buses to optimize CPU latency. The M4 runs at 240 MHz and the architecture supports the ART™ accelerator (a block that speeds up instruction fetching accesses of the Cortex-M4 core to the D1-domain internal memories). The higher clock rate of the M7 makes it suitable to handle complex processing tasks such as data storage, debugging or handling input/output peripherals at a higher efficiency compared to the M4. The dual core processor of the Portenta H7 sets it apart from other single core Arduino boards by allowing true multitasking, faster data processing capabilities, enhanced processing power and application partitioning.  
1926

20-
![The Architectures of Cortex® M7 and M4 cores.](assets/por_ard_dcp_m4_m7_architectures.svg?sanitize=true)
27+
![The Architectures of Cortex® M7 and M4 cores.](assets/por_ard_dcp_m4_m7_architectures.svg)
2128

2229
## Instructions
2330

2431
### Accessing the M7 and M4 Core
2532
To best illustrate the idea of dual core processing, you will be running two separate sketch files. One on each of the cores which blinks the RGB LED in a different colour. The **BlinkRedLed_M7.ino** sketch will set the built-in RGB LED on the board to red and blink it with a delay of 500 ms. The **BlinkGreenLed_M4.ino** sketch will access the green LED in the RGB led and blink it with a delay of 200 ms. Both the cores will be executing the corresponding sketch file simultaneously and as a result both the green and red LED blink, however, at different intervals.
2633

27-
![Running two different sketch files on the different cores.](assets/por_ard_dcp_tutorial_overview.svg?sanitize=true)
34+
![Running two different sketch files on the different cores.](assets/por_ard_dcp_tutorial_overview.svg)
2835

2936
### 1. The Basic Setup
3037
Begin by plugging-in your Portenta board to your computer using an appropriate USB-C cable and have the  Arduino IDE or the Arduino Pro IDE  open. If this is your first time running Arduino sketch files on the board, we suggest you check out how to [Setting Up Portenta H7 For Arduino](https://www.arduino.cc/pro/tutorials/portenta-h7/por-ard-gs) before you proceed.
3138

32-
![A Basic setup of the board attached to your computer](../por-ard-gs/assets/por_ard_gs_basic_setup.svg?sanitize=true)
39+
![A Basic setup of the board attached to your computer](../por-ard-gs/assets/por_ard_gs_basic_setup.svg)
3340

3441
**Note:** You can access the examples from the tutorials library once it's installed: **Examples -> Arduino_Pro_Tutorials -> Dual Core Processing**
3542

@@ -85,7 +92,7 @@ If you would upload the sketch to the M4 at this point nothing would change. The
8592
### 5. Force Booting the M4 Core
8693
The bootloader of the H7 boards is configured in such a way that only M7 gets booted automatically. The reason is that for simple use cases the M4 may not be needed and hence be unprogrammed and doesn't need to get powered. One such instance is when the M7 doesn't have the appropriate firmware that automatically handles the initialization of the M4. As a result you need to force boot the M4 so that it can run a sketch. You can do so through the M7 using a special command, `bootM4()` that boots the M4 when the board is powered.
8794

88-
![The M7 and the M4 cores share the flash memory where the sketches are stored.](assets/por_ard_dcp_m4_m7_flash_memory.svg?sanitize=true)
95+
![The M7 and the M4 cores share the flash memory where the sketches are stored.](assets/por_ard_dcp_m4_m7_flash_memory.svg)
8996

9097
Before you can upload the code for the M4 core to the flash memory you need to add the `bootM4()` command in the **BlinkRedLed_M7.ino** sketch file that is uploaded and run by the M7 core. Copy and paste the following command `bootM4()` inside the `setup()` function of the **BlinkRedLed_M7.ino** sketch and upload the sketch to M7 once again.
9198

content/tutorials/portenta-h7/por-ard-dcp/metadata.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

content/tutorials/portenta-h7/por-ard-flash/content.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: Reading and Writing Flash Memory
3+
coverImage: assets/por_ard_block_device_cover.svg
4+
tags: [Storage, Flash, Block Device]
5+
description: This tutorial demonstrates how to use the on-board flash memory of the Portenta H7 to read and write data using the BlockDevice API provided by Mbed OS.
6+
---
7+
18
# Using the Flash Storage To Read and Write Data
29
## Overview
310
This tutorial demonstrates how to use the on-board flash memory of the Portenta H7 to read and write data using the BlockDevice API provided by Mbed OS. As the internal memory is limited in size we will also take a look at saving data to the QSPI flash memory.

content/tutorials/portenta-h7/por-ard-flash/metadata.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)