From a2aa01d6a746244a65fff18f8220259bd7300cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Bagur=20N=C3=A1jera?= Date: Wed, 4 Oct 2023 00:34:49 -0600 Subject: [PATCH 1/3] Content update (links to existing tutorials and application notes) --- .../opta/tutorials/user-manual/content.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md index 3bfeb7c6cd..aa9c61c86a 100644 --- a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md +++ b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md @@ -1278,6 +1278,10 @@ void changeLights() { **Note**: The example code above employs a "debouncing" technique to ensure that the user button press is recognized as a singular event despite any rapid electrical fluctuations that can occur when physically pressing the button. Upon detecting a press through an interrupt, the sketch waits for a brief interval (150 milliseconds, set by the `debounceDelay` variable) before processing the press. This delay ensures that any additional "noise" or fluctuations don't trigger multiple registrations of the same press, ensuring precise LED sequencing operation. +To learn more into-depth about interrupts in Opta™ devices, check out the following tutorial: + +- [Getting Started with Interrupts on Opta™](https://docs.arduino.cc/tutorials/opta/getting-started-with-interrupts) + ## Real-Time Clock (RTC) Opta™ device's (all variants) microcontroller (the STM32H747XI) features a low-power Real-Time Clock (RTC) with sub-second accuracy and hardware calendar accessible through specific RTC management methods from Mbed™️. @@ -1403,7 +1407,9 @@ Once the RTC has been synchronized in the setup, the sketch enters an infinite l ![Example sketch output in the Arduino IDE's Serial Monitor](assets/user-manual-18_2.png) -You can download the example code [here](assets/opta_rtc_example.zip). To learn more about date and time manipulation operations, check out the [`time` function documentation from Mbed™️](https://os.mbed.com/docs/mbed-os/v5.15/apis/time.html). +You can download the example code [here](assets/opta_rtc_example.zip). To learn more about date and time manipulation operations, check out the [`time` function documentation from Mbed™️](https://os.mbed.com/docs/mbed-os/v5.15/apis/time.html). Also, check out this real-world case described in the following application note where Opta's RTC: + +- [Home Automation with Opta™️](https://docs.arduino.cc/tutorials/opta/home-automation-application-note) ## Arduino IoT Cloud @@ -1577,7 +1583,10 @@ To upload the code to the Opta™ from the online editor, click the green **Veri 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 STATUS LED 1 (`LED_D0`) should light on or off when the position of the switch changes. -To learn more about Opta™ and the Arduino IoT Cloud, check out our [Opta™ Relay Management](https://create.arduino.cc/iot/templates/relay-management) template. This is an excellent template to continue learning about the Arduino IoT Cloud and Opta™. +To learn more about Opta™ and the Arduino IoT Cloud, check out the following resources that can help you learning about the Arduino IoT Cloud and Opta™: + +- [Opta™ Relay Management template](https://create.arduino.cc/iot/templates/relay-management) +- [Using PLC IDE With Arduino® IoT Cloud](https://docs.arduino.cc/tutorials/opta/plc-ide-cloud-support) ## Support From 5ff6a1f546ec7c95139c2a951df79788a2a5958d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Bagur=20N=C3=A1jera?= Date: Tue, 31 Oct 2023 12:39:35 -0600 Subject: [PATCH 2/3] =?UTF-8?q?Content=20update=20(Juli=C3=A1n's=20update)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opta/tutorials/user-manual/content.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md index aa9c61c86a..569dffa5b5 100644 --- a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md +++ b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md @@ -108,6 +108,8 @@ Check out the following resources that will show you how to start with the Ardui - [Arduino PLC IDE download page](https://www.arduino.cc/pro/software-plc-ide) - [Arduino PLC IDE and Opta™ tutorials](https://docs.arduino.cc/hardware/opta) +***The Arduino IDE and the Arduino PLC IDE programming environments have important differences in control and real-time performance, which means that the device is configured differently the first time you use one or the other. In case you have been using Opta with the PLC IDE, and you want to come back to use it inside the Arduino environment, we recommend performing the memory partitioning process that is explained in the [Opta™ Memory Partitioning for Use with the Arduino IDE](https://docs.arduino.cc/tutorials/opta/memory-partitioning) tutorial.*** + ### Pinout ![Opta™ pinout (WiFi variant)](assets/user-manual_4.png) @@ -763,9 +765,13 @@ You should see the following output in the Arduino IDE's Serial Monitor: You can download the example code [here](assets/opta_ethernet_web_client.zip). +The Media Access Control (MAC) address is essential for computer networking and devices with Internet of Things (IoT) capabilities, such as the Opta™. To learn more into-depth about how to retrieve the MAC address of an Opta™ device using the Arduino ecosystem tools, check out the following tutorial: + +- [Retrieve the Opta™ MAC Address](https://docs.arduino.cc/tutorials/opta/mac-address) + ### RS-485 -Opta™ RS485 and WiFi variants have a built-in RS-485 interface, enabling the construction of robust and reliable data transmission systems. RS-485 interface is still the most widely used protocol for Point Of Sale (POS), industrial, and telecommunications applications. The wide common-mode range enables data transmission over longer cable lengths and in noisy environments such as the floor of a factory. Also, the high input impedance of the receivers allows more devices to be attached to the lines. +Opta™ RS485 and WiFi variants have a built-in RS-485 interface, enabling the construction of robust and reliable data transmission systems. RS-485 interface is still the most widely used protocol for Point Of Sale (POS), industrial, and telecommunications applications. The wide common-mode range enables data transmission over longer cable lengths and in noisy environments such as the floor of a facPtory. Also, the high input impedance of the receivers allows more devices to be attached to the lines. ![RS-485 interface in Opta™ devices](assets/user-manual-15.png) @@ -850,6 +856,10 @@ void loop() { The sketch starts with the `configureRS485()` function, which initializes the RS-485 interface with the defined baud rate and turns off data receiving. The `printlnRS485()` function handles the transmission of text messages. It starts the transmission, sends the message followed by a carriage return and newline character, and ends the transmission. The `setup()` function calls the `configureRS485()` function to configure the RS-485 interface and then sends a confirmation message. The `loop()` function repeatedly sends a message every two seconds using the `printlnRS485()` function. +To learn more into-depth about the RS-485 interface in Opta™ devices, check out the following tutorial: + +- [Getting Started with RS-485 on Opta™](https://docs.arduino.cc/tutorials/opta/getting-started-with-rs485) + ### Modbus (RTU/TCP) Opta™ RS485 and WiFi variants incorporate a built-in Modbus interface, enabling the implementation of robust and reliable data transmission systems. Modbus, in its RTU version that utilizes RS-485 serial transmission or in its TCP version that operates over Ethernet, remains one of the most widely used protocols for industrial automation applications, building management systems, and process control, among others. @@ -870,6 +880,8 @@ To learn more about the Modbus interface in Opta™ devices, check out the follo - [Getting Started with Modbus RTU on Opta™](https://docs.arduino.cc/tutorials/opta/getting-started-with-modbus-rtu) - [Modbus TCP On Opta™ Using PLC IDE](https://docs.arduino.cc/tutorials/opta/opta-modbus-tcp-plc-ide) - [Tank Level Monitoring with the Opta™](https://docs.arduino.cc/tutorials/opta/tank-level-app-note) +- [Tank Thermoregulation with Portenta Machine Control & Opta™](https://docs.arduino.cc/tutorials/opta/pmc-opta-temp-ctrl) +- [Energy Management with Opta™](https://docs.arduino.cc/tutorials/opta/energy-management-application-note) ### Wi-Fi® @@ -887,7 +899,6 @@ The sketch below enables an Opta™ device to connect to the Internet via Wi-Fi You need to create first a header file named `arduino_secrets.h` to store your Wi-Fi® network credentials. To do this, add a new tab by clicking the ellipsis (the three horizontal dots) button on the top right of the Arduino IDE 2. - ![Creating a tab in the Arduino IDE 2](assets/user-manual-16.png) @@ -1034,6 +1045,10 @@ Since the data is fetched only once, there's no need for repeatedly sending `HTT You can download the example code [here](assets/opta_wifi_web_client_example.zip). +The MAC address is essential for computer networking and devices with Internet of Things (IoT) capabilities, such as the Opta™. To learn more into-depth about how to retrieve the MAC address of an Opta™ device using the Arduino ecosystem tools, check out the following tutorial: + +- [Retrieve the Opta™ MAC Address](https://docs.arduino.cc/tutorials/opta/mac-address) + ### Bluetooth Low Energy® Opta™ WiFi variant devices feature an onboard Bluetooth Low Energy® module, which supports Bluetooth 5.1 BR/EDR/LE up to 3 Mbps PHY data rate. Bluetooth 4.2 is supported by Arduino firmware. From 114b156d756b20ae890cb3d4de0a6b0ea5cb06d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Bagur=20N=C3=A1jera?= Date: Tue, 7 Nov 2023 18:02:56 -0600 Subject: [PATCH 3/3] =?UTF-8?q?Content=20update=20(Juli=C3=A1n's=20review)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/opta-ble.svg | 0 .../assets/opta-ethernet.svg | 0 .../assets/opta-wifi.svg | 0 .../getting-started-connectivity/content.md | 0 .../hero-banner.png | Bin .../assets/opta-analog-inputs.svg | 0 .../assets/opta-clean-contact.svg | 0 .../assets/opta-core-install.png | Bin .../assets/opta-device-LED.svg | 0 .../assets/opta-device-button.svg | 0 .../getting-started/assets/opta-device.svg | 0 .../assets/opta-out-relays.svg | 0 .../assets/opta-voltage-pins.svg | 0 .../getting-started/content.md | 0 .../getting-started/hero-banner.png | Bin .../mac-address/assets/arduino-ide-1.png | Bin .../mac-address/assets/arduino-ide-2.png | Bin .../assets/mac-address-retrieval.png | Bin .../mac-address/assets/opta_info.ino | 0 .../mac-address/assets/serial-monitor-1.png | Bin .../getting-started/mac-address/content.md | 484 +++++++++--------- .../mac-address/hero-banner.png | Bin .../opta/tutorials/user-manual/content.md | 2 +- 23 files changed, 243 insertions(+), 243 deletions(-) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started-connectivity/assets/opta-ble.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started-connectivity/assets/opta-ethernet.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started-connectivity/assets/opta-wifi.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started-connectivity/content.md (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started-connectivity/hero-banner.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-analog-inputs.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-clean-contact.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-core-install.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-device-LED.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-device-button.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-device.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-out-relays.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/assets/opta-voltage-pins.svg (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/content.md (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/hero-banner.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/assets/arduino-ide-1.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/assets/arduino-ide-2.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/assets/mac-address-retrieval.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/assets/opta_info.ino (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/assets/serial-monitor-1.png (100%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/content.md (97%) rename content/hardware/07.opta/opta-family/opta/{tutorials => _unlisted}/getting-started/mac-address/hero-banner.png (100%) diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-ble.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-ble.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-ethernet.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-ethernet.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-wifi.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/assets/opta-wifi.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/content.md b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/content.md similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/content.md rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/content.md diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/hero-banner.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/hero-banner.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/hero-banner.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started-connectivity/hero-banner.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-analog-inputs.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-analog-inputs.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-analog-inputs.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-analog-inputs.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-clean-contact.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-clean-contact.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-clean-contact.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-clean-contact.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-core-install.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-core-install.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-core-install.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-core-install.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-LED.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device-LED.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-LED.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device-LED.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-button.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device-button.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-button.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device-button.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-device.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-out-relays.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-out-relays.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-out-relays.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-out-relays.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-voltage-pins.svg b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-voltage-pins.svg similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-voltage-pins.svg rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/assets/opta-voltage-pins.svg diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/content.md b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/content.md similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/content.md rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/content.md diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/hero-banner.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/hero-banner.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/hero-banner.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/hero-banner.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/arduino-ide-1.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/arduino-ide-1.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/arduino-ide-1.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/arduino-ide-1.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/arduino-ide-2.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/arduino-ide-2.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/arduino-ide-2.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/arduino-ide-2.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/mac-address-retrieval.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/mac-address-retrieval.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/mac-address-retrieval.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/mac-address-retrieval.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/opta_info.ino b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/opta_info.ino similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/opta_info.ino rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/opta_info.ino diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/serial-monitor-1.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/serial-monitor-1.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/assets/serial-monitor-1.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/assets/serial-monitor-1.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/content.md b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/content.md similarity index 97% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/content.md rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/content.md index 5e38134312..52f59d99fe 100644 --- a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/content.md +++ b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/content.md @@ -1,243 +1,243 @@ ---- -title: 'Retrieve the Opta™ MAC Address' -description: "Learn how to retrieve your Opta™ device's MAC address using the Arduino® ecosystem tools." - -difficulty: beginner -tags: - - Opta™ - - MAC address -author: 'José Bagur and Taddy Chung' -software: - - ide-v1 - - ide-v2 -hardware: - - hardware/07.opta/opta-family/opta ---- - -## Overview - -The Media Access Control (MAC) address is essential for computer networking and devices with Internet of Things (IoT) capabilities, such as the [Opta™](/hardware/opta). In this tutorial, we will learn how to retrieve the MAC address of an Opta™ device using the Arduino ecosystem tools. - -![The Opta™ MAC address retrieval](assets/mac-address-retrieval.png) - -## Goals - -- Learn how to retrieve the MAC address of an Opta™ device. -- Learn how to use the Arduino ecosystem tools to get information from Arduino hardware devices. - -## Hardware and Software Requirements - -### Hardware Requirements - -- [Opta™](https://store.arduino.cc/collections/pro-family) (any variant) (x1) -- USB-C® cable (x1) - -### Software Requirements - -- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) -- [The MAC address retrieval example sketch](assets/opta_info.ino) - -## MAC Address Basics - - -A MAC address is a unique value associated with a network adapter. They are also known, or usually referred to, as the **hardware or physical address** of electronic devices with networking capabilities. The MAC address is used to identify and distinguish it from other devices connected to a network; which allows it to send and receive data to specific devices in the network. - -***A MAC address uniquely identifies a network adapter in a Local Area Network (LAN).*** - -MAC addresses are 48-bit numbers written in one of the following 12 hexadecimal digits formats: - -- `MMMMMMSSSSSS` -- `MM MM MM SS SS SS` -- `MMMM MMSS SSSS` -- `MM:MM:MM:SS:SS:SS` -- `MMMM:MMSS:SSSS` -- `MM.MM.MM.SS.SS.SS` -- `MMMM.MMSS.SSSS` - -The first half of the 12-digit number (the first 24 bits) identifies the adapter manufacturer (identified with an M); the second half of the 12-digit number represents a serial number (identified with an S) assigned to the adapter by its manufacturer. For example: - -- `00:A0:C9:14:C8:29` - -In the MAC address shown above, `00A0C9` indicates that the adapter manufacturer is Intel®, and `14C829` is the serial number assigned by Intel to the adapter. - -### Opta™ MAC Address - -Opta™ is available in three variants; **all of them have an Ethernet connection and its corresponding MAC address and, in the case of the most advanced variant with Wi-Fi®/Bluetooth®, an additional MAC address to identify the additional Wi-Fi®/Bluetooth® module**. Let's learn how to retrieve the MAC addresses of an Opta™ device using the Arduino ecosystem tools. - -## Instructions - -### Setting Up the Arduino IDE - -This tutorial will need the latest version of the Arduino IDE; you can download it [here](https://www.arduino.cc/en/software). If it is your first time setting up the Opta™ with the Arduino IDE, check our [Getting Started with Opta™ tutorial](https://docs.arduino.cc/tutorials/opta/getting-started) first. In the Arduino IDE, we need to install the core for Opta™ devices; this can be done by navigating to **Tools > Board > Boards Manager**. In the Board Manager tab, search for `opta` and install the latest `Arduino Mbed OS Opta Boards` version. - -![Installing the Opta™ core in the Arduino IDE bootloader.](assets/arduino-ide-1.png) - -Now we are ready to start compiling and uploading sketches to an Opta™ device using the Arduino IDE. - -### Retrieving the MAC Address of an Opta™ Device - -Opta™ device information is stored in a secured memory space. The example code shown below shows how that memory space can be accessed using predefined functions of the Opta™ core: - -```arduino -/** - Opta device information retrieval - Name: opta_info.ino - Purpose: Retrieve information of an Opta device such as its bootloader version, hardware functionalities, external memory size, and MAC address. - - @author Arduino PRO Content team - @version 1.0 27/03/22 -*/ - -// Include the necessary header files and define macros -uint8_t* bootloader_data = (uint8_t*)(0x801F000); -uint8_t* bootloader_identification = (uint8_t*)(0x80002F0); - -#if __has_include("opta_info.h") - #include "opta_info.h" - #define GET_OPTA_OTP_BOARD_INFO - OptaBoardInfo* info; - OptaBoardInfo* boardInfo(); -#endif - -void setup() { - Serial.begin(115200); - while (!Serial) {} - delay(2500); - - Serial.println("Opta Device Information"); - - uint8_t currentBootloaderVersion = bootloader_data[1]; - String currentBootloaderIdentifier = String(bootloader_identification, 15); - - if (!currentBootloaderIdentifier.equals("MCUboot Arduino")) { - currentBootloaderIdentifier = "Arduino loader"; - } - - Serial.println("- Bootloader identifier: " + currentBootloaderIdentifier); - Serial.println("- Magic number (validation): " + String(bootloader_data[0], HEX)); - Serial.println("- Bootloader version: " + String(bootloader_data[1])); - -#if defined(GET_OPTA_OTP_BOARD_INFO) - printOptaSecureInfo(); -#endif -} - -#if defined(GET_OPTA_OTP_BOARD_INFO) - -/** - Checks if the magic number is 0xB5. If it is, prints the secure information of the device in the Serial Monitor. - - @params none - @return none -*/ -void printOptaSecureInfo() { - info = boardInfo(); - if (info->magic == 0xB5) { - Serial.println("- Secure information version: " + String(info->version)); - Serial.println("- Ethernet functionality: " + String(info->_board_functionalities.ethernet == 1 ? "Yes" : "No")); - Serial.println("- Wi-Fi module functionality: " + String(info->_board_functionalities.wifi == 1 ? "Yes" : "No")); - Serial.println("- RS-485 functionality: " + String(info->_board_functionalities.rs485 == 1 ? "Yes" : "No")); - Serial.println("- QSPI memory size: " + String(info->external_flash_size) + " MB"); - Serial.println("- Secure board revision: " + String(info->revision >> 8) + "." + String(info->revision & 0xFF)); - Serial.println("- Secure VID: 0x" + String(info->vid, HEX)); - Serial.println("- Secure PID: 0x" + String(info->pid, HEX)); - Serial.println("- Ethernet MAC address: " + String(info->mac_address[0], HEX) + ":" + String(info->mac_address[1], HEX) + ":" + String(info->mac_address[2], HEX) + ":" + String(info->mac_address[3], HEX) + ":" + String(info->mac_address[4], HEX) + ":" + String(info->mac_address[5], HEX)); - if (info->_board_functionalities.wifi == 1) { - Serial.println("- Wi-Fi MAC address: " + String(info->mac_address_2[0], HEX) + ":" + String(info->mac_address_2[1], HEX) + ":" + String(info->mac_address_2[2], HEX) + ":" + String(info->mac_address_2[3], HEX) + ":" + String(info->mac_address_2[4], HEX) + ":" + String(info->mac_address_2[5], HEX)); - } - } else { - Serial.println("- No secure information available!"); - printBootloaderInfo(); - } -} -#endif - -/** - Prints clock source, USB speed, Ethernet functionality, Wi-Fi functionality, RAM memory size, QSPI memory size, video output functionality, and secure element functionality. - - @params none - @return none -*/ -void printBootloaderInfo() { - Serial.println("- Clock source: " + getClockSource(bootloader_data[2])); - Serial.println("- USB Speed: " + getUSBSpeed(bootloader_data[3])); - Serial.println("- Ethernet functionality: " + String(bootloader_data[4] == 1 ? "Yes" : "No")); - Serial.println("- Wi-Fi functionality: " + String(bootloader_data[5] == 1 ? "Yes" : "No")); - Serial.println("- RAM size: " + getRAMSize(bootloader_data[6])); - Serial.println("- QSPI memory size: " + String(bootloader_data[7]) + " MB"); - Serial.println("- Video output functionality: " + String(bootloader_data[8] == 1 ? "Yes" : "No")); - Serial.println("- Secure element functionality: " + String(bootloader_data[9] == 1 ? "Yes" : "No")); -} - -/** - Convert a flag in the bootloader data to USB speed information. - - @param bootloader flag (uint8_t) - @return USB speed information as a String -*/ -String getUSBSpeed(uint8_t flag) { - switch (flag) { - case 1: - return "USB 2.0/Hi-Speed (480 Mbps)"; - case 2: - return "USB 1.1/Full-Speed (12 Mbps)"; - default: - return "N/A"; - } -} - -/** - Convert a flag in the bootloader data to clock source information. - - @param bootloader flag (uint8_t) - @return clock source information as a String -*/ -String getClockSource(uint8_t flag) { - switch (flag) { - case 0x8: - return "External oscillator"; - case 0x4: - return "External crystal"; - case 0x2: - return "Internal clock"; - default: - return "N/A"; - } -} - -/** - Convert a flag in the bootloader data to RAM size information. - - @param bootloader flag (uint8_t) - @return RAM size information as a String -*/ -String getRAMSize(uint8_t flag) { - if (flag == 0) { - return "N/A"; - } - return (String(flag) + "MB"); -} - -void loop() { - delay(1000); -} -``` - -To upload the code, click the **Verify** button to compile the sketch and check for errors; then click the **Upload** button to program the device with the sketch. - -![Uploading a sketch to the Opta™ the Arduino IDE.](assets/arduino-ide-2.png) - -The code above retrieves information from an Opta™ device, including its MAC address, and prints it to the Arduino IDE's Serial Monitor. The information shown includes the bootloader version and identifier, secure board information, and general board information. - -![Opta™ device information shown in the Arduino IDE Serial Monitor.](assets/serial-monitor-1.png) - -- The `printOptaSecureInfo()` function checks if the magic number of the `OptaBoardInfo` structure is `0xB5`, indicating that secure information is available. If it is, it prints the secure information to the IDE's Serial Monitor, including the board's functionalities (Ethernet, Wi-Fi®/Bluetooth® capabilities, and RS-485 capabilities), QSPI memory size, board revision, VID, PID, and the MAC address of the Ethernet port. If the board has Wi-Fi®/Bluetooth® capabilities, the function will also print the MAC address of the Wi-Fi®/Bluetooth® module. -- If the magic number doesn't match, it prints a message indicating that no secure information is available and proceeds to print the bootloader information using the `printBootloaderInfo()` function. The `printBootloaderInfo()` function prints the following information to the IDE's Serial Monitor: clock source, USB speed, Ethernet functionality, Wi-Fi®/Bluetooth® module functionality, RAM size, QSPI memory size, video output functionality, and secure element functionality. - -## Conclusion - -In this tutorial, we have learned how to retrieve the MAC address(es) of an Opta™ device using the Arduino ecosystem tools. Following the provided steps and sketch, you can access essential information about your Opta™ device, such as its bootloader version, hardware functionalities, and MAC address. Understanding this information can be beneficial when working on networking and device identification projects. This knowledge allows you to explore and build more advanced projects using the Opta™ and Arduino ecosystem tools. - -### Next Steps - +--- +title: 'Retrieve the Opta™ MAC Address' +description: "Learn how to retrieve your Opta™ device's MAC address using the Arduino® ecosystem tools." + +difficulty: beginner +tags: + - Opta™ + - MAC address +author: 'José Bagur and Taddy Chung' +software: + - ide-v1 + - ide-v2 +hardware: + - hardware/07.opta/opta-family/opta +--- + +## Overview + +The Media Access Control (MAC) address is essential for computer networking and devices with Internet of Things (IoT) capabilities, such as the [Opta™](/hardware/opta). In this tutorial, we will learn how to retrieve the MAC address of an Opta™ device using the Arduino ecosystem tools. + +![The Opta™ MAC address retrieval](assets/mac-address-retrieval.png) + +## Goals + +- Learn how to retrieve the MAC address of an Opta™ device. +- Learn how to use the Arduino ecosystem tools to get information from Arduino hardware devices. + +## Hardware and Software Requirements + +### Hardware Requirements + +- [Opta™](https://store.arduino.cc/collections/pro-family) (any variant) (x1) +- USB-C® cable (x1) + +### Software Requirements + +- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) +- [The MAC address retrieval example sketch](assets/opta_info.ino) + +## MAC Address Basics + + +A MAC address is a unique value associated with a network adapter. They are also known, or usually referred to, as the **hardware or physical address** of electronic devices with networking capabilities. The MAC address is used to identify and distinguish it from other devices connected to a network; which allows it to send and receive data to specific devices in the network. + +***A MAC address uniquely identifies a network adapter in a Local Area Network (LAN).*** + +MAC addresses are 48-bit numbers written in one of the following 12 hexadecimal digits formats: + +- `MMMMMMSSSSSS` +- `MM MM MM SS SS SS` +- `MMMM MMSS SSSS` +- `MM:MM:MM:SS:SS:SS` +- `MMMM:MMSS:SSSS` +- `MM.MM.MM.SS.SS.SS` +- `MMMM.MMSS.SSSS` + +The first half of the 12-digit number (the first 24 bits) identifies the adapter manufacturer (identified with an M); the second half of the 12-digit number represents a serial number (identified with an S) assigned to the adapter by its manufacturer. For example: + +- `00:A0:C9:14:C8:29` + +In the MAC address shown above, `00A0C9` indicates that the adapter manufacturer is Intel®, and `14C829` is the serial number assigned by Intel to the adapter. + +### Opta™ MAC Address + +Opta™ is available in three variants; **all of them have an Ethernet connection and its corresponding MAC address and, in the case of the most advanced variant with Wi-Fi®/Bluetooth®, an additional MAC address to identify the additional Wi-Fi®/Bluetooth® module**. Let's learn how to retrieve the MAC addresses of an Opta™ device using the Arduino ecosystem tools. + +## Instructions + +### Setting Up the Arduino IDE + +This tutorial will need the latest version of the Arduino IDE; you can download it [here](https://www.arduino.cc/en/software). If it is your first time setting up the Opta™ with the Arduino IDE, check our [Getting Started with Opta™ tutorial](https://docs.arduino.cc/tutorials/opta/getting-started) first. In the Arduino IDE, we need to install the core for Opta™ devices; this can be done by navigating to **Tools > Board > Boards Manager**. In the Board Manager tab, search for `opta` and install the latest `Arduino Mbed OS Opta Boards` version. + +![Installing the Opta™ core in the Arduino IDE bootloader.](assets/arduino-ide-1.png) + +Now we are ready to start compiling and uploading sketches to an Opta™ device using the Arduino IDE. + +### Retrieving the MAC Address of an Opta™ Device + +Opta™ device information is stored in a secured memory space. The example code shown below shows how that memory space can be accessed using predefined functions of the Opta™ core: + +```arduino +/** + Opta device information retrieval + Name: opta_info.ino + Purpose: Retrieve information of an Opta device such as its bootloader version, hardware functionalities, external memory size, and MAC address. + + @author Arduino PRO Content team + @version 1.0 27/03/22 +*/ + +// Include the necessary header files and define macros +uint8_t* bootloader_data = (uint8_t*)(0x801F000); +uint8_t* bootloader_identification = (uint8_t*)(0x80002F0); + +#if __has_include("opta_info.h") + #include "opta_info.h" + #define GET_OPTA_OTP_BOARD_INFO + OptaBoardInfo* info; + OptaBoardInfo* boardInfo(); +#endif + +void setup() { + Serial.begin(115200); + while (!Serial) {} + delay(2500); + + Serial.println("Opta Device Information"); + + uint8_t currentBootloaderVersion = bootloader_data[1]; + String currentBootloaderIdentifier = String(bootloader_identification, 15); + + if (!currentBootloaderIdentifier.equals("MCUboot Arduino")) { + currentBootloaderIdentifier = "Arduino loader"; + } + + Serial.println("- Bootloader identifier: " + currentBootloaderIdentifier); + Serial.println("- Magic number (validation): " + String(bootloader_data[0], HEX)); + Serial.println("- Bootloader version: " + String(bootloader_data[1])); + +#if defined(GET_OPTA_OTP_BOARD_INFO) + printOptaSecureInfo(); +#endif +} + +#if defined(GET_OPTA_OTP_BOARD_INFO) + +/** + Checks if the magic number is 0xB5. If it is, prints the secure information of the device in the Serial Monitor. + + @params none + @return none +*/ +void printOptaSecureInfo() { + info = boardInfo(); + if (info->magic == 0xB5) { + Serial.println("- Secure information version: " + String(info->version)); + Serial.println("- Ethernet functionality: " + String(info->_board_functionalities.ethernet == 1 ? "Yes" : "No")); + Serial.println("- Wi-Fi module functionality: " + String(info->_board_functionalities.wifi == 1 ? "Yes" : "No")); + Serial.println("- RS-485 functionality: " + String(info->_board_functionalities.rs485 == 1 ? "Yes" : "No")); + Serial.println("- QSPI memory size: " + String(info->external_flash_size) + " MB"); + Serial.println("- Secure board revision: " + String(info->revision >> 8) + "." + String(info->revision & 0xFF)); + Serial.println("- Secure VID: 0x" + String(info->vid, HEX)); + Serial.println("- Secure PID: 0x" + String(info->pid, HEX)); + Serial.println("- Ethernet MAC address: " + String(info->mac_address[0], HEX) + ":" + String(info->mac_address[1], HEX) + ":" + String(info->mac_address[2], HEX) + ":" + String(info->mac_address[3], HEX) + ":" + String(info->mac_address[4], HEX) + ":" + String(info->mac_address[5], HEX)); + if (info->_board_functionalities.wifi == 1) { + Serial.println("- Wi-Fi MAC address: " + String(info->mac_address_2[0], HEX) + ":" + String(info->mac_address_2[1], HEX) + ":" + String(info->mac_address_2[2], HEX) + ":" + String(info->mac_address_2[3], HEX) + ":" + String(info->mac_address_2[4], HEX) + ":" + String(info->mac_address_2[5], HEX)); + } + } else { + Serial.println("- No secure information available!"); + printBootloaderInfo(); + } +} +#endif + +/** + Prints clock source, USB speed, Ethernet functionality, Wi-Fi functionality, RAM memory size, QSPI memory size, video output functionality, and secure element functionality. + + @params none + @return none +*/ +void printBootloaderInfo() { + Serial.println("- Clock source: " + getClockSource(bootloader_data[2])); + Serial.println("- USB Speed: " + getUSBSpeed(bootloader_data[3])); + Serial.println("- Ethernet functionality: " + String(bootloader_data[4] == 1 ? "Yes" : "No")); + Serial.println("- Wi-Fi functionality: " + String(bootloader_data[5] == 1 ? "Yes" : "No")); + Serial.println("- RAM size: " + getRAMSize(bootloader_data[6])); + Serial.println("- QSPI memory size: " + String(bootloader_data[7]) + " MB"); + Serial.println("- Video output functionality: " + String(bootloader_data[8] == 1 ? "Yes" : "No")); + Serial.println("- Secure element functionality: " + String(bootloader_data[9] == 1 ? "Yes" : "No")); +} + +/** + Convert a flag in the bootloader data to USB speed information. + + @param bootloader flag (uint8_t) + @return USB speed information as a String +*/ +String getUSBSpeed(uint8_t flag) { + switch (flag) { + case 1: + return "USB 2.0/Hi-Speed (480 Mbps)"; + case 2: + return "USB 1.1/Full-Speed (12 Mbps)"; + default: + return "N/A"; + } +} + +/** + Convert a flag in the bootloader data to clock source information. + + @param bootloader flag (uint8_t) + @return clock source information as a String +*/ +String getClockSource(uint8_t flag) { + switch (flag) { + case 0x8: + return "External oscillator"; + case 0x4: + return "External crystal"; + case 0x2: + return "Internal clock"; + default: + return "N/A"; + } +} + +/** + Convert a flag in the bootloader data to RAM size information. + + @param bootloader flag (uint8_t) + @return RAM size information as a String +*/ +String getRAMSize(uint8_t flag) { + if (flag == 0) { + return "N/A"; + } + return (String(flag) + "MB"); +} + +void loop() { + delay(1000); +} +``` + +To upload the code, click the **Verify** button to compile the sketch and check for errors; then click the **Upload** button to program the device with the sketch. + +![Uploading a sketch to the Opta™ the Arduino IDE.](assets/arduino-ide-2.png) + +The code above retrieves information from an Opta™ device, including its MAC address, and prints it to the Arduino IDE's Serial Monitor. The information shown includes the bootloader version and identifier, secure board information, and general board information. + +![Opta™ device information shown in the Arduino IDE Serial Monitor.](assets/serial-monitor-1.png) + +- The `printOptaSecureInfo()` function checks if the magic number of the `OptaBoardInfo` structure is `0xB5`, indicating that secure information is available. If it is, it prints the secure information to the IDE's Serial Monitor, including the board's functionalities (Ethernet, Wi-Fi®/Bluetooth® capabilities, and RS-485 capabilities), QSPI memory size, board revision, VID, PID, and the MAC address of the Ethernet port. If the board has Wi-Fi®/Bluetooth® capabilities, the function will also print the MAC address of the Wi-Fi®/Bluetooth® module. +- If the magic number doesn't match, it prints a message indicating that no secure information is available and proceeds to print the bootloader information using the `printBootloaderInfo()` function. The `printBootloaderInfo()` function prints the following information to the IDE's Serial Monitor: clock source, USB speed, Ethernet functionality, Wi-Fi®/Bluetooth® module functionality, RAM size, QSPI memory size, video output functionality, and secure element functionality. + +## Conclusion + +In this tutorial, we have learned how to retrieve the MAC address(es) of an Opta™ device using the Arduino ecosystem tools. Following the provided steps and sketch, you can access essential information about your Opta™ device, such as its bootloader version, hardware functionalities, and MAC address. Understanding this information can be beneficial when working on networking and device identification projects. This knowledge allows you to explore and build more advanced projects using the Opta™ and Arduino ecosystem tools. + +### Next Steps + Now that you know how to retrieve the MAC address of an Opta™ device, have a look at the Opta™ [connectivity features tutorial](https://docs.arduino.cc/tutorials/opta/getting-started-connectivity) to learn how to use its connectivity features such as Wi-Fi®, Bluetooth® and Ethernet capabilities. \ No newline at end of file diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/hero-banner.png b/content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/hero-banner.png similarity index 100% rename from content/hardware/07.opta/opta-family/opta/tutorials/getting-started/mac-address/hero-banner.png rename to content/hardware/07.opta/opta-family/opta/_unlisted/getting-started/mac-address/hero-banner.png diff --git a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md index 569dffa5b5..775d7f7961 100644 --- a/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md +++ b/content/hardware/07.opta/opta-family/opta/tutorials/user-manual/content.md @@ -771,7 +771,7 @@ The Media Access Control (MAC) address is essential for computer networking and ### RS-485 -Opta™ RS485 and WiFi variants have a built-in RS-485 interface, enabling the construction of robust and reliable data transmission systems. RS-485 interface is still the most widely used protocol for Point Of Sale (POS), industrial, and telecommunications applications. The wide common-mode range enables data transmission over longer cable lengths and in noisy environments such as the floor of a facPtory. Also, the high input impedance of the receivers allows more devices to be attached to the lines. +Opta™ RS485 and WiFi variants have a built-in RS-485 interface, enabling the construction of robust and reliable data transmission systems. RS-485 interface is still the most widely used protocol for Point Of Sale (POS), industrial, and telecommunications applications. The wide common-mode range enables data transmission over longer cable lengths and in noisy environments such as the floor of a factory. Also, the high input impedance of the receivers allows more devices to be attached to the lines. ![RS-485 interface in Opta™ devices](assets/user-manual-15.png)