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
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: 'Bluetooth® Low Energy, Wi-Fi® and Ethernet on Arduino Opta™'
3
-
description: "Learn how to make use of the Arduino Opta's connectivity features"
3
+
description: "Learn how to make use of the Opta's connectivity features."
4
4
difficulty: beginner
5
5
tags:
6
6
- Wi-Fi®
@@ -45,19 +45,19 @@ The Arduino Opta™ is a powerful micro PLC device that has many features, allow
45
45
46
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).
47
47
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
+
Then we need to install the appropriate core for the Arduino Opta. Go to **Tools > Board > Boards Manager**, in the board's 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).
49
49
50
50
### Wi-Fi®
51
51
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
+
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 the desired website defined within `char server[] = "example.com";` variable. If the connection is successful, it will then print the website's HTML content to the serial monitor. If the sketch ran successfully, the output should look like the image below.
53
53
54
54

55
55
56
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/).
57
57
58
58
### Ethernet
59
59
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
+
The Arduino Opta has an 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.
61
61
62
62

63
63
@@ -69,7 +69,7 @@ The Arduino Opta can be configured to use Modbus TCP protocol, which runs a Modb
69
69
70
70
### Bluetooth® Low Energy
71
71
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 example that 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
+
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 the ArduinoBLE library is installed, let's try and run a simple example that 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.
73
73
74
74

Copy file name to clipboardExpand all lines: content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/content.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: 'Getting Started with Modbus RTU on the Opta™'
3
-
description: "Learn how to use the Modbus RTU serial protocol on the Opta™."
2
+
title: 'Getting Started with Modbus RTU on the Arduino Opta™'
3
+
description: "Learn how to use the Modbus RTU serial protocol on the Arduino Opta™."
4
4
difficulty: intermediate
5
5
tags:
6
6
- Getting started
@@ -64,7 +64,7 @@ First, let's ensure we have the latest Arduino IDE version installed on our comp
64
64
65
65
Now that we have the Arduino IDE configured and the libraries installed, let's connect both Opta™ devices via RS485, as shown in the image below:
66
66
67
-

67
+

68
68
69
69
### Code Overview
70
70
@@ -459,8 +459,12 @@ void loop() {
459
459
460
460
Once you have uploaded the Modbus RTU Client and Server code for each Opta™ device, we can open the Serial Monitor on the Client side to debug the communication status between the devices. If everything is working correctly, you will be able to see `Success!` messages after each read-and-write task as shown in the image below:
461
461
462
-

462
+

463
463
464
464
## Conclusion
465
465
466
-
In this tutorial, we established a Modbus RTU connection between two Opta™ devices using the Arduino ecosystem tools, such as the Arduino IDE and Arduino libraries. The `ArduinoRS485` and `ArduinoModbus` libraries are essential components that enable communication with compatible Modbus RTU devices. With the demonstrative example described in this tutorial, we have established communication between a Modbus RTU Server and a Client; we can now configure and set a secondary Opta™ or use a Modbus RTU-compatible module for your project developments.
466
+
In this tutorial, we established a Modbus RTU connection between two Opta™ devices using the Arduino ecosystem tools, such as the Arduino IDE and Arduino libraries. The `ArduinoRS485` and `ArduinoModbus` libraries are essential components that enable communication with compatible Modbus RTU devices. With the demonstrative example described in this tutorial, we have established communication between a Modbus RTU Server and a Client; we can now configure and set a secondary Opta™ or use a Modbus RTU-compatible module for your project developments.
467
+
468
+
### Next Steps
469
+
470
+
Now that you know how to create and use a Modbus RTU communication with Opta™, you can take a look at [Getting started with connectivity on the Opta™ tutorial](/tutorials/opta/getting-started-connectivity) to discover more about all the connectivity possibilities that Opta™ has.
Copy file name to clipboardExpand all lines: content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/content.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: 'Getting Started with RS-485 on the Opta™'
3
-
description: "Learn how to make use of the RS-485 communication interface on the Opta™"
2
+
title: 'Getting Started with RS-485 on the Arduino Opta™'
3
+
description: "Learn how to make use of the RS-485 communication interface on the Arduino Opta™."
4
4
difficulty: beginner
5
5
tags:
6
6
- Getting started
@@ -57,7 +57,7 @@ Here are some important functions in the sketch:
57
57
58
58
Connect the Opta™ devices according to the image shown below:
59
59
60
-

60
+

61
61
62
62
### RS-485 Sender Sketch
63
63
@@ -162,8 +162,8 @@ In this tutorial, we established an RS-485 connection between two Opta™ device
162
162
163
163
### Next Steps
164
164
165
-
Now that you are familiar with the RS-485 communication interface on the Opta™, look at our at our [getting started tutorial]() to get a better overview of other features on the device.
165
+
Now that you are familiar with the RS-485 communication interface on the Opta™, look at our [getting started tutorial](/tutorials/opta/getting-started) to get a better overview of other features on the device.
166
166
167
-
If you wish to incorporate Wi-Fi/Bluetooth® Low Energy in your Opta™ solutions, have a look at our [connectivity tutorial]().
167
+
If you wish to incorporate Wi-Fi/Bluetooth® Low Energy in your Opta™ solutions, have a look at our [connectivity tutorial](/tutorials/opta/getting-started-connectivity).
168
168
169
-
If you are interested in seeing the RS-485 interface and the Opta™ being put to work in a reallife scenario, have a look at our [tank level application note]().
169
+
If you are interested in seeing the RS-485 interface and the Opta™ being put to work in a real-life scenario, have a look at our [Tank level application note](/tutorials/opta/tank-level-app-note).
Copy file name to clipboardExpand all lines: content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/content.md
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
---
2
-
title: 'Getting Started With the Arduino Opta™'
2
+
title: 'Getting Started with the Arduino Opta™'
3
3
description: 'Get started with the Opta™ and get to know some of its features.'
4
4
difficulty: beginner
5
5
tags:
6
6
- Getting started
7
7
- Relays
8
8
- Analog Input
9
+
- Digital Input
9
10
author: 'Benjamin Dannegård'
10
11
software:
11
12
- ide-v1
@@ -43,7 +44,7 @@ Opta™ is a robust micro PLC solution with many engaging features. In this tuto
43
44
### Setup With the Arduino IDE
44
45
45
46
Make sure the latest version of the Arduino IDE is installed. The IDE can be downloaded [here](https://www.arduino.cc/en/software).
46
-
Within the Arduino IDE install the core for the Opta™. Go to **Tools > Board > Boards Manager**, in the boards manager section search for **Opta mbed** and install it.
47
+
Within the Arduino IDE install the core for the Opta™. Go to **Tools > Board > Boards Manager**, in the board's manager section search for **Opta mbed** and install it.
47
48
48
49

49
50
@@ -103,7 +104,7 @@ void loop() {
103
104
104
105
### Configuring the Programmable Button on the Opta
105
106
106
-
Opta™ has a programmable button, shown on the image below and identified as USER. It can be programmed using the Arduino IDE to fit your needs. To show how much simple is to use it, let's create a sketch and program the button as a trigger to modify the status of the STATUS LEDs.
107
+
Opta™ has a programmable button, shown on the image below and identified as USER. It can be programmed using the Arduino IDE to fit your needs. To show how simple is to use it, let's create a sketch and program the button as a trigger to modify the status of the STATUS LEDs.
107
108
108
109

109
110
@@ -164,13 +165,13 @@ void changeLights() {
164
165
165
166
Once the sketch is uploaded, you can see that an additional LED is turned on each time you press the button, following the sequence:
166
167
167
-
| Interaction | Result |
168
-
| ------------ | -----------------------------|
169
-
| First press | STATUS LED 1 ON.|
170
-
| Second press | STATUS LEDs 1 and 2 ON.|
171
-
| Third press | STATUS LEDs 1, 2 and 3 ON.|
172
-
| Fourth press | STATUS LEDs 1, 2, 3 and 4 ON.|
173
-
| Fifth press | All STATUS LEDs off and back.|
168
+
| Interaction | Result |
169
+
| ------------ | ---------------------------- |
170
+
| First press | STATUS LED 1 ON |
171
+
| Second press | STATUS LEDs 1 and 2 ON |
172
+
| Third press | STATUS LEDs 1, 2 and 3 ON |
173
+
| Fourth press | STATUS LEDs 1, 2, 3 and 4 ON |
174
+
| Fifth press | All STATUS LEDs off and back |
174
175
175
176
176
177
### Using Out Relays
@@ -190,14 +191,14 @@ The relays coils correspond to pins D0 to D3 as follows:
190
191
191
192
The Opta™ output contacts are "clean" contacts, which means they are contacts that are not alive in a "non-connection" situation. This type of contact can be used in any system and with any type of voltage. To properly function, the outputs must therefore be connected by bringing for example a power cable to one of the terminals and connecting the load to the exit of the other terminal.
192
193
193
-
This way, when the contact is closed by the logic set in the programming, the power supply signal will cross the contact carring the signal up to the reference load.
194
+
This way, when the contact is closed by the logic set in the programming, the power supply signal will cross the contact carrying the signal up to the reference load.
194
195
195
196
The “clean” contact also allows carrying a different power system or type of load for each output contact, being possible to control multiple devices or signals that use different voltage levels.
196
197
197
198

198
199
199
200
Let's run a simple sketch to test the output relays on Opta™: in this sketch all the 4 relays are closing and reopening their contacts and after each relay's cycle a led will be turned on to provide visual feedback.
200
-
To activate the relays and run this sketch you need to provide Opta™ with a voltage from 12 to 24 V DC by connecting it a proper power supply.
201
+
To activate the relays and run this sketch you need to provide Opta™ with a voltage from 12 to 24 V DC by connecting it to a proper power supply.
201
202
202
203
Opta™ has dedicated terminals for power supply located in the upper part of Opta™ and next to the inputs. They are duplicated to help the user to connect the power supply and any common part to the input terminals but they have the same potential (upon polarity).
203
204
@@ -331,11 +332,11 @@ void loop() {
331
332
332
333
Once you have uploaded the code, open the serial monitor to see the values read in each analog input. If you have connected a device with an analog voltage value in I1, I2, and/or I3 you will see the voltage or analog value of each of the signals. In case you did not connect anything to the analog inputs, you will see how the values oscillate between 0V and a very small value because the pins are floating.
333
334
334
-
You may notice from the output values that when the maximum value of 10V is reached, the corresponding numerical value is not 4095 as the maximum value with 12 bits resolution should be. The reason is that there is a precautional margin taken on the maximum voltage level applicable to the inputs to preserve the integrity of the microcontroller.
335
+
You may notice from the output values that when the maximum value of 10V is reached, the corresponding numerical value is not 4095 as the maximum value with 12 bits resolution should be. The reason is that there is a precautional margin taken on the maximum voltage level applied to the inputs to preserve the integrity of the microcontroller.
335
336
336
337
### Connecting Opta™ to the Cloud
337
338
338
-
It is possible to use the Opta™ with the Arduino Cloud. To set up the Opta™ to the cloud go to the [Arduino Cloud](https://cloud.arduino.cc/). For help with how to get started with the cloud, go to our [Getting started with the cloud](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started) tutorial. We also have a number of other helpful tutorials for [the Arduino cloud](https://docs.arduino.cc/arduino-cloud/).
339
+
It is possible to use the Opta™ with the Arduino Cloud. To set up the Opta™ to the cloud go to the [Arduino Cloud](https://cloud.arduino.cc/). For help with how to get started with the cloud, go to our [Getting started with the cloud](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started) tutorial. We also have some other helpful tutorials for [the Arduino cloud](https://docs.arduino.cc/arduino-cloud/).
0 commit comments