Skip to content

Commit 54ccf7b

Browse files
authored
Merge pull request #1561 from arduino/jacobhylen/unor4-analogreference
[MKC-1356][MKC-1357]Add more info about the Analog Reference on UNO R4
2 parents 2dbab99 + 5e1b259 commit 54ccf7b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

content/hardware/02.hero/boards/uno-r4-minima/tutorials/cheat-sheet/cheat-sheet.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,12 @@ The UNO R4 Minima has six analog input pins (A0-A5) that can be read by using th
129129
value = analogRead(pin);
130130
```
131131

132-
The reference voltage of these pins is 5 V.
132+
The default reference voltage of these pins is 5 V, but this can be changed as follows:
133133

134-
The default resolution is set to 10-bit but can be updated to 12 and 14-bit resolutions. To do so, use the following method in the `setup()` of your sketch.
134+
- `analogReference(AR_DEFAULT)` (Default reference of 5 V)
135+
- `analogReference(AR_INTERNAL)` (Built in reference of 1.5 V.)
136+
137+
The default resolution is set to 10-bit, but can be updated to 12 and 14-bit resolutions. To do so, use the following method in the `setup()` of your sketch.
135138
- `analogReadResolution(10)` (default)
136139
- `analogReadResolution(12)`
137140
- `analogReadResolution(14)`

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/cheat-sheet/cheat-sheet.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ The UNO R4 WiFi has six analog input pins (A0-A5) that can be read by using the
135135
value = analogRead(pin);
136136
```
137137

138-
The reference voltage of these pins is 5 V.
138+
The default reference voltage of these pins is 5 V, but this can be changed as follows:
139+
140+
- `analogReference(AR_DEFAULT)` (Default reference of 5 V)
141+
- `analogReference(AR_INTERNAL)` (Built in reference of 1.5 V.)
139142

140143
The default resolution is set to 10-bit, but can be updated to 12 and 14-bit resolutions. To do so, use the following method in the `setup()` of your sketch.
141144
- `analogReadResolution(10)` (default)

0 commit comments

Comments
 (0)