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/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/content.md
+17-16Lines changed: 17 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: 'Bluetooth® Low Energy, Wi-Fi® and Ethernet on Arduino Opta®'
2
+
title: 'Bluetooth® Low Energy, Wi-Fi® and Ethernet on Arduino Opta™'
3
3
description: "Learn how to make use of the Arduino Opta's connectivity features"
4
4
difficulty: beginner
5
5
tags:
@@ -22,17 +22,18 @@ hardware:
22
22
23
23
## Overview
24
24
25
-
The Arduino Opta® is a powerful PLC device that has many features, allowing you to customize its use for your solution. Among these features are the standard connectivity features: Wi-Fi®, Ethernet and Bluetooth®. In this tutorial we will go through how to use these features with the Arduino IDE and the Arduino Opta®.
25
+
The Arduino Opta™ is a powerful micro PLC device that has many features, allowing you to customize its use for your solution. Among these features are the standard connectivity features: Wi-Fi®, Ethernet and Bluetooth®. Please note that these connectivity features are not available on all variants of the Arduino Opta™. In this tutorial we will go through how to use these features with the Arduino IDE and the Arduino Opta™.
26
26
27
27
## Goals
28
28
29
-
- Learn how to use Bluetooth® Low Energy on the Arduino Opta®
30
-
- Learn how to use Wi-Fi® on the Arduino Opta®
31
-
- Learn how to use Ethernet on the Arduino Opta®
29
+
- Learn how to use Wi-Fi® on the Arduino Opta™
30
+
- Learn how to use Ethernet on the Arduino Opta™
31
+
- Learn how to use Bluetooth® Low Energy on the Arduino Opta™
- USB-C® cable (either USB-C to USB-A or USB-C to USB-C)
@@ -42,42 +43,42 @@ The Arduino Opta® is a powerful PLC device that has many features, allowing you
42
43
43
44
### Setup With the Arduino IDE
44
45
45
-
Using the Arduino IDE we can easily work with these peripherals. Some featureshave their own library that we can make use of. Make sure the latest version of the Arduino IDE is installed. The IDE can be downloaded [here](https://www.arduino.cc/en/software).
46
+
Using the Arduino IDE we can easily work with the connectivity features, which have their own libraries that we can make use of. Make sure the latest version of the Arduino IDE is installed. The IDE can be downloaded [here](https://www.arduino.cc/en/software).
46
47
47
-
Then we need to install the appropriate core for the Arduino Opta®. Go to **Tools > Board > Boards Manager**, in the boards manager section search for **Opta mbed** and install it. For more detailed instructions on setting up the Arduino Opta® with the Arduino IDE, have a look at the [Getting started with opta™ tutorial](/tutorials/opta/getting-started).
48
+
Then we need to install the appropriate core for the Arduino Opta. Go to **Tools > Board > Boards Manager**, in the boards manager section search for **Opta mbed** and install it. For more detailed instructions on setting up the Arduino Opta with the Arduino IDE, have a look at the [Getting started with opta™ tutorial](/tutorials/opta/getting-started).
48
49
49
50
### Wi-Fi®
50
51
51
-
The files necessary for using the Wi-Fi® on the Arduino Opta® are included in the core. To try it out, we can go to **File > Examples**, and under **Examples for Opta** we can find the **WiFi** section. Inside there is an example sketch called **WiFiWebClient**. Open this example sketch and fill out the WiFi details in the **arduino_secrets.h** tab. The sketch will make the Arduino Opta® connect to desired website defined within `char server[] = "example.com";` variable. If the connection is successful, it will then print the websites' HTML content to the serial monitor. If the sketch ran successfully, the output should look like the image below.
52
+
The files necessary for using the Wi-Fi® on the Arduino Opta are included in the core. To try it out, we can go to **File > Examples**, and under **Examples for Opta** we can find the **WiFi** section. Inside there is an example sketch called **WiFiWebClient**. Open this example sketch and fill out the WiFi details in the **arduino_secrets.h** tab. The sketch will make the Arduino Opta® connect to desired website defined within `char server[] = "example.com";` variable. If the connection is successful, it will then print the websites' HTML content to the serial monitor. If the sketch ran successfully, the output should look like the image below.
52
53
53
-

54
+

54
55
55
56
If you want to take a deeper look at what features the **WiFi** library has to offer, [take a look at the API reference page](https://www.arduino.cc/reference/en/libraries/wifi/).
56
57
57
58
### Ethernet
58
59
59
-
The Arduino Opta® has a RJ45 ethernet port with a LED that will indicate the status of the connected cable. The files necessary for using Ethernet on the Arduino Opta® are included in the core. To try it out, we can go to **File > Examples**, and under **Examples for Opta** we can find the **Ethernet** section. Inside there is an example sketch called **WebClient**. Connect the Ethernet cable to the Arduino Opta® and upload the example. This example will function the same way as the one mentioned in the Wi-Fi® section. The device will connect to the website defined in the sketch and print the websites' HTML content in the serial monitor. If the sketch ran successfully, the output should look like the image below.
60
+
The Arduino Opta has a RJ45 ethernet port with a LED that will indicate the status of the connected cable. The files necessary for using Ethernet with the Arduino Opta are included in the core. To try it out, we can go to **File > Examples** and under **Examples for Opta** we can find the **Ethernet** section. Inside there is an example sketch called **WebClient**. Connect the Ethernet cable to the Arduino Opta and upload the example. This example will function the same way as the one mentioned in the Wi-Fi® section. The device will connect to the website defined in the sketch and print the website's HTML content in the serial monitor. If the sketch ran successfully, the output should look like the image below.
60
61
61
-

62
+

62
63
63
64
If you want to take a deeper look at what features the **Ethernet** library has to offer, [take a look at the API reference page](https://www.arduino.cc/reference/en/libraries/ethernet/).
64
65
65
66
### Modbus TCP Via Ethernet Port
66
67
67
-
The Arduino Opta® can be configured to use Modbus TCP protocol, which basically runs on Ethernet instead of serial lines using TCP interface over RTU protocol. Thus the coverage distance is dependent on the capacity of the Ethernet cable. For example, Cat6a cable could be paired with Arduino Opta® to operate inside industrial environment. Modbus TCP is a variant of the Modbus family of simple, vendor-neutral communication protocols intended for supervision and control of automation equipment. Specifically, it covers the use of Modbus messaging in an intranet or internet environment using the TCP/IP protocols. The most common use of the protocols at this time is for Ethernet attachment of PLCs, I/O modules and gateways to other simple field buses or I/O networks.
68
+
The Arduino Opta can be configured to use Modbus TCP protocol, which runs a Modbus protocol layered over a TCP/IP stack. Thus the coverage distance is dependent on the capacity of the Ethernet cable. In the case of an industrial environment, a good cable choice could be an RJ45 cable with the category Cat6 or Cat6A allowing a maximum distance of 100 meters.
68
69
69
70
### Bluetooth® Low Energy
70
71
71
-
To use the Bluetooth® feature, you will need to download the **ArduinoBLE** library in the Arduino IDE. Go into the **library manager** and search for **ArduinoBLE**. if you can't find it, try sorting by official libraries published by Arduino. Once ArduinoBLE library is installed, let's try and run a simple example. We will test with the sketch that scans for other Bluetooth® devices within range. The sketch will then print the found devices address, local name and the advertised service UUIDs, if present. You can find the example under **File > Examples > ArduinoBLE > Central**, the sketch is called **Scan**. When the sketch is running on the Opta, the output on the serial monitor should look something like the image below.
72
+
To use the Bluetooth® Low Energy feature, you will need to download the **ArduinoBLE** library in the Arduino IDE. Go into the **library manager** and search for **ArduinoBLE**. if you can't find it, try sorting by official libraries published by Arduino. Once ArduinoBLE library is installed, let's try and run a simple examplethat scans for other Bluetooth® devices within range. The sketch will print the found devices address, local name and the advertised service UUIDs, if present. The example can be found under **File > Examples > ArduinoBLE > Central**, the sketch is called **Scan**. When the sketch is running on the Opta, the output on the serial monitor should look something like the image below.
72
73
73
74

74
75
75
76
If you want to take a deeper look at what features the **ArduinoBLE** library has to offer, [take a look at the API reference page](https://www.arduino.cc/reference/en/libraries/arduinoble/).
76
77
77
78
## Conclusion
78
79
79
-
Now you have a better overview of the connectivity features on the Arduino Opta® and how to use them. We went through how to use the different connectivity features and what libraries are required for them. By running all the example sketches on our device, we have made sure that the modules are all working and everything is up to date.
80
+
This tutorial has shown an overview of the connectivity features of the Arduino Opta and how to use them. Including how to use the different connectivity features and what libraries are required to make them work. By running all the example sketches mentioned in this tutorial, you can confirm that the connectivity features of your Arduino Opta are ready to be implemented into other more complex solutions.
80
81
81
82
### Next Steps
82
83
83
-
Now that you know how to use the connectivity features of the device, have a look at our other tutorials and try to combine the different features. The Arduino Opta® uses the same architecture as the Portanta H7, it could therefore be a good idea to take a look at the Portenta H7 tutorials. Such as the using your [device as a Wi-Fi® access point tutorial](https://docs.arduino.cc/tutorials/portenta-h7/wifi-access-point) or the [Bluetooth® Low Energy connectivity with a phone tutorial](https://docs.arduino.cc/tutorials/portenta-h7/ble-connectivity).
84
+
Now that you know how to use the connectivity features of the device, have a look at our other tutorials and try to combine the different features. The Arduino Opta uses the same architecture as the Portanta H7, it could therefore be a good idea to take a look at the Portenta H7 tutorials. Such as the using your [device as a Wi-Fi® access point tutorial](https://docs.arduino.cc/tutorials/portenta-h7/wifi-access-point) or the [Bluetooth® Low Energy connectivity with a phone tutorial](https://docs.arduino.cc/tutorials/portenta-h7/ble-connectivity).
0 commit comments