Skip to content

Commit af7bad9

Browse files
committed
Updates to PWM section
1 parent a5d7d30 commit af7bad9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ You may use them as analog output pins with the function:
169169
analogWrite(pin, value);
170170
```
171171

172+
By default, the resolution is 8 bit (0-255), You can use `analogWriteResolution()` to change this, supporting up to 12 bit (0-4096) resolution.
173+
174+
```arduino
175+
analogWriteResolution(resolution);
176+
```
177+
172178
### Digital Pins
173179

174180
The UNO R4 Minima features a total of digital 14 pins. Though some of them serve another purpose and shouldn't be used for GPIO if you have other pins available.

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,13 @@ You may use them as analog output pins with the function:
197197
analogWrite(pin, value);
198198
```
199199

200-
**Please Note:** the following pins are PWM capable but may interfere with other functionalities of the UNO R4 WiFi board. When writing library functions, please do not use this as they are not officially supported PWM pins.
200+
By default, the resolution is 8 bit (0-255), You can use `analogWriteResolution()` to change this, supporting up to 12 bit (0-4096) resolution.
201+
202+
```arduino
203+
analogWriteResolution(resolution);
204+
```
205+
206+
Please note that the following pins are PWM capable but may interfere with other functionalities of the UNO R4 WiFi board. When writing library functions, please do not use this as they are not officially supported PWM pins.
201207

202208
| Pin | RA4M1 | Timer |
203209
| --------- | ----- | ------- |

0 commit comments

Comments
 (0)