Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ For the Portenta C33, the `LED_BUILTIN` macro represents the **green LED** of th

To upload the code to the Portenta C33, click the **Verify** button to compile the sketch and check for errors; then click the **Upload** button to program the board with the sketch.

![Uploading a sketch to the Portenta C33 in the Arduino IDE.](assets/user-manual-6.png)
![Uploading a sketch to the Portenta C33 in the Arduino IDE](assets/user-manual-6.png)

You should see now the green LED of the built-in RGB LED turn on for one second, then off for one second, repeatedly.

Expand Down Expand Up @@ -692,7 +692,7 @@ The Portenta C33 supports UART communication. The pins used in the Portenta C33
| `92` | `P603` |
| `93` | `P604` |

Please, refer to the board pinout section of the user manual to find them on the board. The UART pins can be used through the built-in ([Serial](https://www.arduino.cc/reference/en/language/functions/communication/serial/)) library functions.
Please, refer to the board pinout section of the user manual to find them on the board. The built-in ([Serial](https://www.arduino.cc/reference/en/language/functions/communication/serial/)) library functions can use the UART pins.


To begin with UART communication, you'll need to configure it first. In the `setup()` function, set the baud rate (bits per second) for UART communication:
Expand Down Expand Up @@ -1205,7 +1205,7 @@ Some key advantages of having an onboard QSPI Flash memory are the following:
- **Extended functionality**: The additional memory space allows more complex applications to be developed and run on your Portenta C33. This application includes data logging, image processing, audio processing, and executing complex algorithms.
- **Firmware updates**: The MX25L12833F QSPI Flash memory can also store firmware or software updates for your Arduino board. This means you can update the firmware without requiring a complete reprogramming of the board.

The Arduino Renesas Core has built-in libraries and drivers that let you use the onboard QSPI Flash memory immediately. Let's walk through an example code demonstrating some of the onboard Flash memory capabilities; the main tasks performed in the sketch are initializing the Flash memory, writing to a file, and reading from a file.
The Arduino Renesas Core has built-in libraries and drivers that immediately let you use the onboard QSPI Flash memory. Let's walk through an example code demonstrating some of the onboard Flash memory capabilities; the main tasks performed in the sketch are initializing the Flash memory, writing to a file, and reading from a file.

```arduino
/**
Expand Down Expand Up @@ -1426,6 +1426,174 @@ Here's what each section of the example code does:
- **Public key import**: The public key derived from the generated private key is imported to the secure element with key ID 899.
- **Signature verification**: The example code then verifies the signature using the imported public key and prints a success or failure message accordingly.

## Arduino IoT Cloud

The Portenta C33 is fully compatible with the Arduino Cloud IoT, making it easy to develop professional applications simply and quickly. By using the IoT Cloud, you can, for example, monitor sensor data, control your board and actuators connected to it remotely, and update your device's firmware via OTA.

In case it is the first time you are using the Arduino IoT Cloud:

- To use the Arduino IoT Cloud, you need an account. If you do not have an account, create one for free [here](https://cloud.arduino.cc/).
- To use the Arduino Web Editor or Arduino IoT Cloud, the Arduino Create Agent must be running on your computer. You can install the Arduino Create Agent [here](https://create.arduino.cc/getting-started/plugin/welcome).

Let's walk through a step-by-step demonstration of how to use your Portenta C33 board with the Arduino IoT Cloud. Log in to your Arduino IoT Cloud account; you should see the following:

![Arduino IoT Cloud initial page](assets/user-manual-13.png)

First, associate your Portenta C33 board with your Arduino IoT Cloud. To do this, navigate to **Devices** and then click on the **ADD DEVICE** button:

![Arduino IoT Cloud Devices page](assets/user-manual-14.png)

The **Setup Device** pop-up window will appear, navigate into **AUTOMATIC** and select the **Arduino board** option:

![Arduino IoT Cloud Setup Device pop-up window](assets/user-manual-15.png)

After a while, your Portenta C33 board should be discovered by the Arduino IoT Cloud, as shown below:

![Arduino IoT Cloud Setup Device pop-up window](assets/user-manual-16.png)

Click the **CONFIGURE** button, give your board a name, and select the type of network connection. In this example, we will use a Wi-Fi® connection; you can also use an Ethernet connection with a [Portenta Max Carrier](https://store.arduino.cc/products/portenta-max-carrier), a [Portenta Breakout](https://store.arduino.cc/products/arduino-portenta-breakout), or a custom-made board with an Ethernet connector. Your Portenta C33 board will be configured to communicate securely with the Arduino IoT Cloud. This process can take a while.


![Arduino IoT Cloud Setup Device pop-up window](assets/user-manual-17.png)

Once the Portenta C33 has been configured, let's create a "Thing" to test the connection between your board and the Arduino IoT Cloud. Navigate into **Things** and select the **CREATE THING** button; give your thing a name.


![Arduino IoT Cloud "Thing" setup](assets/user-manual-18.png)

Navigate into **Associate Device** and click the **Select Device** button, select your Portenta C33 board and associate it to your "Thing." Then, navigate into **Network** and click the **Configure** button; enter your network credentials. The project is now ready to add some variables to your "Thing"; navigate into **Cloud Variables** and click the **ADD VARIABLE** button.

![Add variable button](assets/user-manual-19.png)


Add one variable with the following characteristics:

- **Name**: `led`
- **Variable type**: `boolean`
- **Variable permission** `Read & Write`
- **Variable update policy**: `On change`

![Arduino IoT Cloud "Thing" variable setup](assets/user-manual-21.png)

You should see the `led` variable in the **Cloud Variables** section. Navigate into **Dashboards** and select the **BUILD DASHBOARD** button; this will create a new dashboard; give your dashboard a name.

Add the following widgets to your dashboard:

- **Switch**: name the widget `Switch` and link it to the `led` variable you created before.
- **LED**: name the widget `led` and link it to the `led` variable you created before.

Your dashboard should see the following:

![Arduino IoT Cloud Dashboard setup](assets/user-manual-20.png)

Go back to your **Things** and open the "Thing" you created. In the "Thing" setup page, navigate into **Sketch**, where you should see the online editor.


In the generated sketch, define `LED_BUILTIN` pin as an output in the `setup()` function:

```arduino
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);

// LED_BUILTIN macro access the onboard green LED
pinMode(LED_BUILTIN, OUTPUT);

// Defined in thingProperties.h
initProperties();

// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
```

In the `onLedChange()` function, you must set the LED state with the `led` variable.

```arduino
/*
Since Led is READ_WRITE variable, onLedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLedChange() {
digitalWrite(LED_BUILTIN, led);
}
```

The complete example code can be found below:

```arduino
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/5667878a-bf88-483b-a17e-6600b63e7da8

Arduino IoT Cloud Variables description

The following variables are automatically generated and updated when changes are made to the Thing

bool led;

Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);

// Defined in thingProperties.h
initProperties();

// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}

void loop() {
ArduinoCloud.update();
// Your code here
}

/*
Since Led is READ_WRITE variable, onLedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLedChange() {
digitalWrite(LED_BUILTIN, !led);
}
```

To upload the code to the Portenta C33 from the online editor, click the green **Verify** button to compile the sketch and check for errors, then click the green **Upload** button to program the board with the sketch.

![Uploading a sketch to the Portenta C33 in the Arduino IoT Cloud](assets/user-manual-22.png)

Navigate into **Dashboards** again, your board should connect to the Wi-Fi® network you defined before (you can follow the connection process with the online editor integrated Serial Monitor). Your board's green LED should light on or off when the position of the switch is changed.

## Support

If you encounter any issues or have questions while working with the Portenta C33, we provide various support resources to help you find answers and solutions.
Expand Down