Skip to content

Commit 597aecd

Browse files
authored
Merge pull request #824 from vtavernier/fix/analog-write-nano33ble
Specify behavior of analogWrite on Nano 33 BLE/BLE Sense
2 parents 9b54e70 + 21d8921 commit 597aecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Language/Functions/Analog IO/analogWrite.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ subCategories: [ "Analog I/O" ]
2020
Writes an analog value (http://arduino.cc/en/Tutorial/PWM[PWM wave]) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to `analogWrite()`, the pin will generate a steady rectangular wave of the specified duty cycle until the next call to `analogWrite()` (or a call to `digitalRead()` or `digitalWrite()`) on the same pin.
2121

2222
[options="header"]
23+
2324
|=========================================================================================================================
2425
|=========================================================================================================================
2526
| Board | PWM Pins +*+ | PWM Frequency
@@ -33,13 +34,14 @@ Writes an analog value (http://arduino.cc/en/Tutorial/PWM[PWM wave]) to a pin. C
3334
| MKR1000 WiFi +**+ | 0 - 8, 10, 11, A3, A4 | 732 Hz
3435
| Zero +**+ | 3 - 13, A0, A1 | 732 Hz
3536
| Nano 33 IoT +**+ | 2, 3, 5, 6, 9 - 12, A2, A3, A5 | 732 Hz
36-
| Nano 33 BLE/BLE Sense | 1 - 13, A0 - A7 | 500 Hz
37+
| Nano 33 BLE/BLE Sense +****+ | 1 - 13, A0 - A7 | 500 Hz
3738
| Due +***+ | 2-13 | 1000 Hz
3839
| 101 | 3, 5, 6, 9 | pins 3 and 9: 490 Hz, pins 5 and 6: 980 Hz
3940
|=========================================================================================================================
4041
+*+ These pins are officially supported PWM pins. While some boards have additional pins capable of PWM, using them is recommended only for advanced users that can account for timer availability and potential conflicts with other uses of those pins. +
4142
+**+ In addition to PWM capabilities on the pins noted above, the MKR, Nano 33 IoT, and Zero boards have true analog output when using `analogWrite()` on the `DAC0` (`A0`) pin. +
4243
+***+ In addition to PWM capabilities on the pins noted above, the Due has true analog output when using `analogWrite()` on pins `DAC0` and `DAC1`.
44+
+****+ Only 4 different pins can be used at the same time. Enabling PWM on more than 4 pins will abort the running sketch and require resetting the board to upload a new sketch again. +
4345

4446
[%hardbreaks]
4547

0 commit comments

Comments
 (0)