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/edge-control/tutorials/user-manual/content.md
+34-35Lines changed: 34 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -812,17 +812,17 @@ To learn more about using these outputs, follow our guide: [Connecting and Contr
812
812
813
813
These outputs must be connected to external devices through third-party protection/power circuits with high impedance inputs (max +/- 25 mA). They are suitable for custom applications where just the activation signal is needed, such as external relay modules or direct connections with other control devices like PLC inputs.
814
814
815
-
With the following command you can control the output state:
815
+
With the following command, you can control the output state:
816
816
817
817
```arduino
818
818
Latching.channelDirection(LATCHING_CMD_1, NEGATIVE); //this define the output and channel (P or N) that will be controlled
819
819
Latching.strobe(200); //this define the time the output is activated.
820
820
```
821
821

822
822
823
-
The example code shown below activates the first channel `Latching Outputs` and `Latching Commands` for a defined time (strobe) in a sequence:
823
+
The example code below activates the first channel `Latching Outputs` and `Latching Commands` for a defined time (strobe) in a sequence:
824
824
825
-
This example code could also be found on **File > Examples > Arduino_EdgeControl > Basic > Latching**
825
+
This example code can also be found on **File > Examples > Arduino_EdgeControl > Basic > Latching**.
826
826
827
827
```arduino
828
828
#include <Arduino_EdgeControl.h>
@@ -870,8 +870,7 @@ The Edge Control has **four solid state relay outputs**, mapped as follows:
870
870
| Solid State Relay 3 | RELAY_CH03 |
871
871
| Solid State Relay 4 | RELAY_CH04 |
872
872
873
-
This relay outputs are suitable for AC loads with a current draw below 2.5A and a 24V AC power supply.
874
-
873
+
These relay outputs are suitable for AC loads with a current draw below 2.5 A and a 24 V AC power supply.
875
874
You can control the relay outputs individually using this function:
876
875
877
876
```arduino
@@ -881,7 +880,7 @@ Relay.off(RELAY_CH01); // this command opens the channel 1 relay contacts
881
880
```
882
881

883
882
884
-
The example code shown below closes and opens the first channel `Relay Contact` repetitively, turning on and off the connected load:
883
+
The example code below closes and opens the first channel `Relay Contact` repetitively, turning on and off the connected load:
885
884
886
885
```arduino
887
886
#include "Arduino_EdgeControl.h"
@@ -968,9 +967,9 @@ void loop()
968
967
969
968
### Power Rails
970
969
971
-
The Edge Control let you manage the power state of several internal components, so energyefficient applications could be achieved using this board.
970
+
The Edge Control lets you manage the power state of several internal components, so energy-efficient applications can be achieved using this board.
972
971
973
-
To power on or off a power rail the `Power.on(<rail>)` and `Power.off(<rail>)`function is used.
972
+
To power on or off a power rail, the `Power.on(<rail>)` and `Power.off(<rail>)`functions are used.
974
973
975
974
The different commands and controllable power rails will be specified in the list below:
976
975
@@ -990,19 +989,19 @@ Power.on(PWR_MKR2); // turns on the MKR board connected to slot 2
990
989
991
990
Designed for industrial and smart agriculture applications, the Arduino Edge Control Enclosure Kit is the perfect companion for Arduino Edge Control. It provides the module with a sturdy case that protects it from the elements, dust, and accidental blows. It is IP40-certified and compatible with DIN rails, making it safe and easy to fit in any standard rack or cabinet.
992
991
993
-
On top of this, the Arduino Edge Control Enclosure Kit features a 2-row/16-character LCD display with white backlight and a programmable push button, so it can be customized by users to instantly visualize sensor data, such as weather conditions and soil parameters. Different data can be displayed at every push of the button, on the spot and in real time, without requiring connectivity.
992
+
In addition, the Arduino Edge Control Enclosure Kit features a 2-row/16-character LCD display with a white backlight and a programmable push button. Users can customize it to instantly visualize sensor data, such as weather conditions and soil parameters. Different data can be displayed at every push of the button, on the spot and in real time, without requiring connectivity.
994
993
995
994
### LCD Control
996
995
997
-
The functions to control the LCD are mostly the same as the ones we are used to in the Arduino ecosystem.
996
+
The functions for controlling the LCD are mostly the same as those used in the Arduino ecosystem.
998
997
999
-
We need to include the `Arduino_EdgeContro.h` library and then, initialize the LCD with the `LCD.begin(16, 2)` function and start printing data on it.
998
+
We need to include the `Arduino_EdgeContro.h` library and initialize the LCD with the `LCD.begin(16, 2)` function and start printing data on it.
1000
999
1001
-
With `LCD.backlight()` and `LCD.noBacklight()` we can turn on or off the LCD backlight respectively.
1000
+
With `LCD.backlight()` and `LCD.noBacklight()`, we can turn on or off the LCD backlight respectively.
1002
1001
1003
1002
To define the cursor position, `LCD.setCursor(x, y)` is used, and to clear the display, `LCD.clear()`.
1004
1003
1005
-
To display text, we use the `LCD.print(text)` function.
1004
+
We use the `LCD.print(text)` function to display text.
1006
1005
1007
1006
The example code below prints "Edge Control" in the first row and starts a seconds counter in the second one:
1008
1007
@@ -1031,9 +1030,9 @@ void loop() {
1031
1030
1032
1031
### Push Button
1033
1032
1034
-
The Enclosure Kit includes a push button so you can interact with the device in an easy way.
1033
+
The Enclosure Kit includes a push button, so you can easily interact with the device.
1035
1034
1036
-
To read the button state we can use the built-in functions of the Arduino programming language. We first need to define it as an input using the `POWER_ON` macro.
1035
+
To read the button state, we can use the built-in functions of the Arduino programming language. First, we need to define it as an input using the `POWER_ON` macro.
1037
1036
1038
1037
```arduino
1039
1038
pinMode(POWER_ON, INPUT); // the push button is addressed to the MCU input as "POWER_ON"
@@ -1088,9 +1087,9 @@ The built-in Real Time Clock of the Edge Control is ideal for timing irrigation
1088
1087
1089
1088
***To maintain the RTC on time the included CR2032 coin cell must be used.***
1090
1089
1091
-
An example code to test the RTC functionality can be found on **File > Examples > Arduino_EdgeControl > Basic > RealTimeClock**
1090
+
An example code to test the RTC functionality can be found on **File > Examples > Arduino_EdgeControl > Basic > RealTimeClock**.
1092
1091
1093
-
In the example code, there is a .h file called Helpers that includes very useful and easy-to-use functions for parsing the time on different formats.
1092
+
In the example code, a **`.h`** file called Helpers includes useful and easy-to-use functions for parsing the time on different formats.
1094
1093
1095
1094
Initially, you must set the current time as a reference for the RTC. This is made just once and can be done using the function setEpoch([Current Unix Time](https://www.unixtimestamp.com/)):
1096
1095
@@ -1099,15 +1098,15 @@ Initially, you must set the current time as a reference for the RTC. This is mad
1099
1098
RealTimeClock.setEpoch(Unix Time); // You can use the timestamp generated on https://www.unixtimestamp.com/. Be aware that the time found on the webpage is UTC.
1100
1099
```
1101
1100
1102
-
The `time(NULL)` function returns the Unix time (seconds since Jan 1st 1970), this is perfect for cloud and servers data logging.
1101
+
The `time(NULL)` function returns the Unix time (seconds since Jan 1st, 1970), perfect for logging data in the cloud and servers.
1103
1102
1104
1103
```arduino
1105
1104
getRTDateTime(); // 2023-09-30 16:33:19
1106
1105
getRTCTime(); // 16:33:19
1107
1106
getRTCDate(); // 2023-09-30
1108
1107
```
1109
1108
1110
-
Also, you can use these more specific functions to retrieve the time in a custom way:
1109
+
Also, you can use these more specific functions to retrieve the time in a custom manner:
1111
1110
1112
1111
```arduino
1113
1112
RealTimeClock.getYears(); //return the current year
@@ -1118,24 +1117,25 @@ RealTimeClock.getMinutes(); //return the current minutes
1118
1117
RealTimeClock.getSeconds(); //return the current seconds
1119
1118
```
1120
1119
1121
-
To test the example code, press the Edge Control Enclosure Kit button to set the time once with the code build date. (The button should be pressed while the code is being upload or while a hard reset).
1120
+
To test the example code, press the Edge Control Enclosure Kit button to set the time once with the code build date. (The button should be pressed while the code is uploaded or during a hard reset).
1122
1121
1123
1122

1124
1123
1125
1124
## Communication
1125
+
1126
1126
The Edge Control communication peripherals are not accessible to the user as a normal development board because it isn't. For example, the `SPI` communication is reserved for the micro SD card and external memory ICs.
1127
1127
1128
1128
### I2C
1129
1129
1130
-
The pins used in the Edge Control for the I2C communication protocol are the ones on the MKR slots. Refer to the [board pinout section](#pinout) of the user manual to find them on the board.
1130
+
The pins used in the Edge Control for the I2C communication protocol are on the MKR slots. To find them on the board, refer to the [board pinout section](#pinout) of the user manual.
1131
1131
1132
-
The Edge Control supports I2C communication, which allows data transmission between the board and other I2C-compatible devices. Internal components like the LCD driver, the RealTime Clock and the I/O expanders use this protocol.
1132
+
The Edge Control supports I2C communication, which allows data transmission between the board and other I2C-compatible devices. Internal components like the LCD driver, the Real-Time Clock, and the I/O expanders use this protocol.
1133
1133
1134
-
The NINA-B306 has two I2C ports, the I2C_1 is the one shared with the internal components and the MKR1 header, and the I2C_2 is exclusively connected to the MKR2 header.
1134
+
The NINA-B306 has two I2C ports. The `I2C_1` is shared with the internal components and the MKR1 header, and the `I2C_2` is exclusively connected to the MKR2 header.
1135
1135
1136
1136

1137
1137
1138
-
***Use `Wire` to communicate with MKR1 (I2C_1), and `Wire1` to communicate with MKR2 (I2C_2).***
1138
+
***Use `Wire` to communicate with MKR1 (`I2C_1`), and `Wire1` to communicate with MKR2 (`I2C_2`).***
1139
1139
1140
1140
To use I2C communication, include the `Wire` library at the top of your sketch. The `Wire` library provides functions for I2C communication:
1141
1141
@@ -1191,7 +1191,7 @@ while (Wire.available()) {
1191
1191
}
1192
1192
```
1193
1193
1194
-
In the example code below, we are going to communicate the `Edge Control`with a`MKR WiFi 1010` connected to MKR1 connector. With a potentiometer connected to the Edge Control, the onboard `LED` of the `MKR board` will be controlled, so we will be sending the brightness value through I2C to it.
1194
+
In the example code below, we will establish communication between the `Edge Control`and an`MKR WiFi 1010` connected to the **MKR1** connector. With a potentiometer connected to the Edge Control, the onboard `LED` of the `MKR board` will be controlled, so we will send the brightness value through I2C to it.
1195
1195
1196
1196
***Use the same connection from [this section](#analog-inputs) for the potentiometer wiring.***
The pins used in the Edge Control for the UART communication protocol are the ones on the MKR slots. Refer to the [board pinout section](#pinout) of the user manual to find them on the board.
1361
+
The pins used in the Edge Control for the UART communication protocol are found on the MKR slots. Refer to the [board pinout section](#pinout) of the user manual to find them on the board.
1362
1362
1363
-
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:
1363
+
To begin with UART communication, you will need to configure it first. In the `setup()` function, set the baud rate (bits per second) for UART communication:
1364
1364
1365
1365
```arduino
1366
1366
// Start UART communication at 115200 baud
1367
1367
Serial1.begin(115200);
1368
1368
```
1369
1369
1370
-
To read incoming data, you can use a `while()` loop to continuously check for available data and read individual characters. The code shown above stores the incoming characters in a String variable and process the data when a line-ending character is received:
1370
+
To read incoming data, you can use a `while()` loop to continuously check for available data and read individual characters. The code shown above stores the incoming characters in a String variable and processes the data when a line-ending character is received:
To learn more about how to communicate the Edge Control through UART with other devices, we will use the example code below that can be found on **File > Examples > Arduino_EdgeControl > RPC > BlinkOverSerial**
1413
-
1412
+
To learn more about how to communicate the Edge Control through UART with other devices, we will use the example code below that can be found on **File > Examples > Arduino_EdgeControl > RPC > BlinkOverSerial**.
1414
1413
1415
1414
This example shows how to export Arduino functions as remote procedure calls (RPC), the Edge Control is capable of controlling a MKR board built-in LED by Serial communication.
1416
1415
@@ -1470,13 +1469,13 @@ void loop()
1470
1469
1471
1470
## Micro SD Card
1472
1471
1473
-
A Micro SD Card can be integrated to the Edge Control for sensor data logging, storing projects configurations or any application concerned to data storage.
1472
+
A Micro SD Card can be integrated into the Edge Control for sensor data logging, storing project configurations, or any application concerned with data storage.
1474
1473
1475
-
The very known [SD library](https://www.arduino.cc/reference/en/libraries/sd/) is compatible with the Edge Control, we can test the included examples just by adding some lines of code needed by the Edge Control.
1474
+
The well-known [SD library](https://www.arduino.cc/reference/en/libraries/sd/) is compatible with Edge Control. We can test the included examples by adding some lines of code that Edge Control needs.
1476
1475
1477
-
The example code used below is an adaptation of the "Datalogger" example included in the `SD` library. It logs the value sampled from an analog input of the Edge Control.
1476
+
The example code below is an adaptation of the `Datalogger` example in the `SD` library. It logs the value sampled from an analog input of the Edge Control.
1478
1477
1479
-
The same wiring of the [analog input section](#analog-inputs) can be used, with the addition of an micro SD card attached.
1478
+
The same wiring of the [analog input section](#analog-inputs) can be used with the attached micro SD card.
1480
1479
1481
1480
```arduino
1482
1481
#include <Arduino_EdgeControl.h>
@@ -1551,7 +1550,7 @@ void loop() {
1551
1550
}
1552
1551
```
1553
1552
1554
-
You will be able to read all the sampled data from the micro SD card on a `.txt` file called `DATALOG`. You can use a USB adaptar or a micro SD card slot on your PC to read the file.
1553
+
You can read all the sampled data from the micro SD card on a `.txt` file called `DATALOG` using a USB adapter or a micro SD card slot on your PC.
1555
1554
1556
1555

0 commit comments