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
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3018,8 +3018,8 @@ The expansion channels are configured as **analog voltage inputs** using the fun
3018
3018
3019
3019
```arduino
3020
3020
AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
3021
-
i, // the device (connected expansion index from 0 to 5)
3022
-
k, // the output channel you are using (0 to 7)
3021
+
i, // the device (connected expansion index from 0 to 5)
3022
+
k, // the output channel you are using (0 to 7)
3023
3023
OA_VOLTAGE_ADC, // adc type (voltage input)
3024
3024
true, // enable pull down
3025
3025
false, // disable rejection
@@ -3212,8 +3212,8 @@ The expansion channels are configured as **analog current inputs** using the fun
3212
3212
3213
3213
```arduino
3214
3214
AnalogExpansion::beginChannelAsAdc(OptaController, // the expansion object
3215
-
i, // the device (connected expansion index from 0 to 5)
3216
-
k, // the output channel you are using (0 to 7)
3215
+
i, // the device (connected expansion index from 0 to 5)
3216
+
k, // the output channel you are using (0 to 7)
3217
3217
OA_CURRENT_ADC, // adc type (voltage input)
3218
3218
false, // enable pull down
3219
3219
false, // disable rejection
@@ -3226,16 +3226,22 @@ After the Opta™ controller is programmed with the example sketch, open the Ard
3226
3226
3227
3227
```
3228
3228
Analog Expansion n. 0
3229
-
- ch 0 -> Current 0.00 mA
3229
+
- ch 0 -> Current 18.20 mA
3230
3230
- ch 1 -> Current 0.00 mA
3231
3231
- ch 2 -> Current 0.00 mA
3232
3232
- ch 3 -> Current 0.00 mA
3233
3233
- ch 4 -> Current 0.00 mA
3234
-
- ch 5 -> Current 18.20 mA
3234
+
- ch 5 -> Current 0.00 mA
3235
3235
- ch 6 -> Current 0.00 mA
3236
3236
- ch 7 -> Current 0.00 mA
3237
3237
```
3238
-

3238
+

3239
+
3240
+
There is another approach for interfacing 4-20 mA sensors that consists of defining the channel as a voltage output, connecting the sensor to the channel and measuring the current of the loop. Use the following example sketch instead:
0 commit comments