You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/04.pro/carriers/portenta-breakout/tutorials/getting-started/content.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Getting Started With the Arduino Portenta Breakout
3
3
difficulty: easy
4
4
tags: [Getting Started, Setup, PWM, Analog, I2C]
5
-
description: This tutorial will give you an overview of the core features of the breakout, setup the development environment and introduce the APIs required to program the board.
5
+
description: This tutorial will give you an overview of the core features of the Portenta Breakout, setup the development environment and introduce the APIs required to program the board.
6
6
author: Manuel Zomer, Pablo Marquínez, Sebastian Romero
7
7
---
8
8
@@ -31,32 +31,32 @@ The Arduino Portenta Breakout is a versatile tool designed for developing, testi
31
31
## Instructions
32
32
33
33
### 1. Get to Know the Carrier
34
-
The Portenta Breakout is made to reduce development time and gives access to the Portenta's High Density connectors as well as features Ethernet, USBA, a JTAG connector and more. For this tutorial however, we will focus on using the **Arduino_PortentaBreakout** library to get access to the High Density connectors and create some simple example use cases.
34
+
The Portenta Breakout is designed to reduce development time. It gives access to the Portenta's High Density connectors as well as features Ethernet, USB-A, a JTAG connector and more. However, for this tutorial, we will focus on using the **Arduino_PortentaBreakout** library to get access to the High Density connectors and create some simple example use cases.
35
35
36
36

37
37
38
38
### 2. The Basic Setup
39
-
As part of this tutorial we will create two sample use cases for the **Arduino_PortentaBreakout** library: starting with using the Portenta Breakout's PWM pins to connect an LED and fade its brightness high ad low. Secondly we will connect an external potentiometer to showcase how to use the Portenta Breakout to read an analog input. In order to use the pins on the Portenta Breakout to connect external components as described in this tutorial, pin headers have to be soldered on to the used pins. We recommend using double row pin headers.
39
+
As part of this tutorial, we will create two sample use cases for the **Arduino_PortentaBreakout** library: starting by using the Portenta Breakout's PWM pins to connect an LED and fade its brightness high ad low. Secondly, we will connect an external potentiometer to showcase how to use the Portenta Breakout to read an analog input. In order to use the pins on the Portenta Breakout to connect external components, pin headers have to be soldered on to the used pins. We recommend using double row pin headers.
40
40
41
-
After having prepared the Portenta Breakout by soldering on pin headers we can start using it. The board comes with two DIP switches called **BOOT** and **BT_SEL**. These switches are used to keep the Portenta in either boot-mode (BT_SEL switch) or to enable the embedded bootloader (BOOT switch) to upload firmware via the USB port on the Portenta Breakout. For this tutorial we have to make sure, to set both DIP switches in the **OFF** position. Having done that we can connect the Portenta H7 to the Portenta Breakout using the two high density connectors in the orientation showcased by the dashed line on the Portenta Breakout.
41
+
After having prepared the Portenta Breakout by soldering on pin headers, we can start using it. The board comes with two DIP switches called **BOOT** and **BT_SEL**. These switches are used to keep the Portenta in either boot-mode (BT_SEL switch) or to enable the embedded bootloader (BOOT switch) to upload firmware via the USB port on the Portenta Breakout. In this case, we have to make sure that both DIP switches are set in the **OFF** position. Having done that, we can connect the Portenta H7 to the Portenta Breakout using the two high density connectors in the orientation showcased by the dashed line on the Portenta Breakout.
42
42
43
43

44
44
45
45
### 3. The Circuit
46
-
In order to build this example's circuit we need our Portenta Breakout with the Portenta H7 on top and headers soldered on (at least within the ANALOG/PWM and GPIO section on the bottom right corner of the carrier). Then we need a simple LED, an adequate resistor for it (we are using a 220Ω resistor) as well as a potentiometer. To connect all these components we use jumper wires and a breadboard by following this schematic:
46
+
In order to build this example circuit, we need our Portenta Breakout with the Portenta H7 on top and headers soldered on (at least within the ANALOG/PWM and GPIO section on the bottom right corner of the carrier). Then we need a simple LED, an adequate resistor for it (we are using a 220Ω resistor) as well as a potentiometer. To connect all these components we use jumper wires and a breadboard by following this schematics:
47
47
48
48

49
49
50
-
For the LED we can use any of the Portenta Breakout's 10 PWM Pins, in this case **PWM 9**. For the potentiometer on the other hand we can use one of the analog pins A0 to A7 in order to read the the potentiometers current value, in this example we use **A7**. For the potentiometer we also need a 3.3V power source, which we take from the GPIO section on the Portenta Breakout, considering it being located most conveniently and close by. Lastly Potentiometer and LED have to be connected to GND and the circuit is finished.
50
+
For the LED we can use any of the Portenta Breakout's 10 PWM Pins, in this case **PWM 9**. For the potentiometer, on the other hand, we can use one of the analog pins (A0 to A7) in order to read the potentiometer current value, in this example we use **A7**. The potentiometer also needs a 3.3V power source, which we take from the GPIO section on the Portenta Breakout, considering it being located most conveniently and close by. Eventually, potentiometer and LED have to be connected to GND to finilize the circuit.
51
51
52
-
After having connected everything the Portenta H7 can be plugged into the computer using a USBC cable and we can start with the code.
52
+
After having connected everything, the Portenta H7 can be plugged into the computer using a USB-C cable and we can start with the code.
53
53
54
54
### 4. The Arduino_PortentaBreakout Library
55
-
In the Arduino IDE we create a new Sketch and make sure we have selected the Arduino Portenta H7 on the M7 core, if you haven't used the Portenta H7 before, [here](/tutorials/portenta-h7/setting-up-portenta)is a detailed tutorial on how to get started with it.
55
+
In the Arduino IDE we create a new Sketch and make sure we have selected the Arduino Portenta H7 on the M7 core. If you haven't used the Portenta H7 before, [here](/tutorials/portenta-h7/setting-up-portenta)you can find a detailed tutorial on how to get started with it.
56
56
57
-
In order to use the pins on the Portenta Breakout we need to install the **Arduino_PortentaBreakout** Library which allows us to address all the pins located on the Carrier. Therefore we need to download the library using the library manager by going to **Sketch > Include Libraries > Manage Libraries** and search for **Arduino_PortentaBreakout**.
57
+
In order to use the pins on the Portenta Breakout we need to install the **Arduino_PortentaBreakout** Library, which allows us to address all the pins located on the Carrier. Therefore, we need to download the library using the library manager, by going to **Sketch > Include Libraries > Manage Libraries** and search for **Arduino_PortentaBreakout**.
58
58
59
-
Once we have installed the Portenta Breakout library we can import it to our Sketch.
59
+
Once we have installed the Portenta Breakout library, we can import it to our Sketch.
Once we have the pins in place, we can start controlling the LED we connected to `PWM9`, therefore we create a byte variable containing our pin number and can set the `pinMode` within the `setup()` function.
75
+
Once we have the pins in place, we can start controlling the LED we connected to `PWM9` by creating a byte variable containing our pin number and setting the `pinMode` within the `setup()` function.
76
76
77
77
```cpp
78
78
byte pwmPinNumber = 9;
@@ -97,7 +97,7 @@ void loop() {
97
97
}
98
98
```
99
99
100
-
When uploading the sketch to the board we should now see the LED fading up and down in brightness. If that works as expected, we can proceed with connecting the potentiometer to our code.
100
+
While uploading the sketch to the board, we should see the LED fading up and down in brightness. If that works as expected, we can proceed connecting the potentiometer to our code.
101
101
102
102
### Analog Inputs Through the Portenta Breakout
103
103
Similar to the PWM code we need to define our pinNumber first, we will also create a variable to save the last value potentiometer value that has been read. Before the `setup()`function we therefore specify the following:
@@ -115,7 +115,7 @@ while (!Serial);
115
115
Serial.println("Initialized Breakout Carrier example sketch");
116
116
```
117
117
118
-
Once we completed the setup we can then update the loop `loop()` function to read the incoming potentiometer value and write it to the serial monitor. Also we can update the PWM setting for the LED to instead of fading up and down on repeat, to follow the potentiometers value.
118
+
Once we completed the setup, we can then update the loop `loop()` function to read the incoming potentiometer value and write it to the Serial Monitor. We can also update the PWM setting for the LED instead of fading up and down on repeat, to follow the potentiometers value.
119
119
120
120
```cpp
121
121
voidloop() {
@@ -132,7 +132,7 @@ void loop() {
132
132
}
133
133
```
134
134
135
-
Once the sketch is re-uploaded and we start the serial monitor the Portenta starts reading the current potentiometer value and translates it into different brightness levels of our LED.
135
+
Once the sketch is re-uploaded and we start the Serial Monitor, the Portenta starts reading the current potentiometer value and translates it into different brightness levels of our LED.
136
136
137
137
## Conclusion
138
138
This sketch shows a simple usage of the Portenta Breakout in combination with the **Arduino_PortentaBreakout** Library to access and control some of the Portenta's High Density connectors. The library can thereby also be used for other protocols and pins such as I2C, UART and more. Within the "Next Steps" section below,there is a table of reference regarding how to address specific pins or what API to use.
@@ -375,4 +375,4 @@ This section includes a table of reference regarding the **Arduino_PortentaBreak
375
375
376
376
### Next Steps
377
377
378
-
More examples on how to use the Portenta Breakout can be found in the examples menu in the IDE after installing the library. They can be found under **File > Examples > Arduino_PortentaBreakout**.
378
+
More examples on how to use the Portenta Breakout can be found in the examples menu in the IDE after installing the library. They can be found under **File > Examples > Arduino_PortentaBreakout**.
0 commit comments