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/07.opta/opta-family/opta/tutorials/01.user-manual/content.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2883,6 +2883,7 @@ The following example will let you read all the analog inputs of every expansion
2883
2883
2884
2884
```arduino
2885
2885
#include "OptaBlue.h"
2886
+
2886
2887
#define PERIODIC_UPDATE_TIME 500
2887
2888
#define DELAY_AFTER_SETUP 5000
2888
2889
@@ -3014,7 +3015,7 @@ for(int i = 0; i < OptaController.getExpansionNum(); i++) { // check all the av
3014
3015
```
3015
3016
The above method will check if there is an Ext A0602 expansion connected in the `i` index from the five admitted. This will ensure which expansion the read state belongs to.
3016
3017
3017
-
The expansion channels are configured as **analog voltage inputs** using the function `beginChannelAsAdc` alongside the following parameters:
3018
+
The expansion channels are configured as **analog voltage inputs** using the function `beginChannelAsAdc()` alongside the following parameters:
3018
3019
3019
3020
```arduino
3020
3021
AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
@@ -3027,7 +3028,7 @@ AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
3027
3028
0); // disable averaging
3028
3029
```
3029
3030
3030
-
You can also use the simplified dedicated method using the function `beginChannelAsVoltageAdc` as follows:
3031
+
You can also use the simplified dedicated method using the function `beginChannelAsVoltageAdc()` as follows:
3031
3032
3032
3033
```arduino
3033
3034
exp.beginChannelAsVoltageAdc(<exp channel>); // pass the desired input as argument
@@ -3214,7 +3215,7 @@ for(int i = 0; i < OptaController.getExpansionNum(); i++) { // check all the av
3214
3215
```
3215
3216
The above method will check if there is an Ext A0602 expansion connected in the `i` index from the five admitted. This will ensure which expansion the read state belongs to.
3216
3217
3217
-
The expansion channels are configured as **analog current inputs** using the function `beginChannelAsAdc` alongside the following parameters:
3218
+
The expansion channels are configured as **analog current inputs** using the function `beginChannelAsAdc()` alongside the following parameters:
3218
3219
3219
3220
```arduino
3220
3221
AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
@@ -3227,7 +3228,7 @@ AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
3227
3228
0); // disable averaging
3228
3229
```
3229
3230
3230
-
You can also use the simplified dedicated method using the function `beginChannelAsCurrentAdc` as follows:
3231
+
You can also use the simplified dedicated method using the function `beginChannelAsCurrentAdc()` as follows:
3231
3232
3232
3233
```arduino
3233
3234
exp.beginChannelAsCurrentAdc(<exp channel>); // pass the desired input as argument
@@ -3414,8 +3415,8 @@ The Analog Expansion input channels can be used for temperature metering with **
3414
3415
3415
3416
3 wires RTDs has generally two wires with the same color.
3416
3417
3417
-
- Connect the two wires with the same color to the - and the ICx screw terminals respectively.
3418
-
- Connect the wire with a different color to the + screw terminal.
3418
+
- Connect the two wires with the same color to the `-` and the `ICx` screw terminals respectively.
3419
+
- Connect the wire with a different color to the `+` screw terminal.
3419
3420
3420
3421
***3 wires RTD can only be measured by channels __I1__ and __I2__.***
3421
3422
@@ -3434,6 +3435,7 @@ For the following example a 2 wires **PT1000** will be used connected to **I1**.
3434
3435
3435
3436
#define PERIODIC_UPDATE_TIME 2000
3436
3437
#define DELAY_AFTER_SETUP 1000
3438
+
3437
3439
// RTD constants
3438
3440
float a = 0.0039083;
3439
3441
float b = -0.0000005775;
@@ -3802,7 +3804,7 @@ for(int i = 0; i < OptaController.getExpansionNum(); i++) { // check all the av
3802
3804
```
3803
3805
The above method will check if there is an Ext A0602 expansion connected in the `i` index from the five admitted. This will ensure which expansion the read state belongs to.
3804
3806
3805
-
The expansion channels are configured as **voltage output** using the function `beginChannelAsDac` alongside the following parameters:
3807
+
The expansion channels are configured as **voltage output** using the function `beginChannelAsDac()` alongside the following parameters:
3806
3808
3807
3809
```arduino
3808
3810
AnalogExpansion::beginChannelAsDac(OptaController, // object class
@@ -3991,7 +3993,7 @@ for(int i = 0; i < OptaController.getExpansionNum(); i++) { // check all the av
3991
3993
```
3992
3994
The above method will check if there is an Ext A0602 expansion connected in the `i` index from the five admitted. This will ensure which expansion the read state belongs to.
3993
3995
3994
-
The expansion channels are configured as **current output** using the function `beginChannelAsDac` alongside the following parameters:
3996
+
The expansion channels are configured as **current output** using the function `beginChannelAsDac()` alongside the following parameters:
3995
3997
3996
3998
```arduino
3997
3999
AnalogExpansion::beginChannelAsDac(OptaController, // object class
@@ -4203,6 +4205,8 @@ To control a status LED use the built-in function `switchLedOn()` or `switchLedO
4203
4205
```arduino
4204
4206
// Turn ON
4205
4207
exp.switchLedOn(<LED>, <update>); // define the LED to control and set to true or false the update parameter
4208
+
4209
+
// Turn OFF
4206
4210
exp.switchLedOff(<LED>, <update>); // define the LED to control and set to true or false the update parameter
4207
4211
```
4208
4212
If the `update` parameter is set to "false", then you will be setting the desired status of the LED but it won't be applied until you call `updateLeds()` function.
0 commit comments