Skip to content

Commit 94c9932

Browse files
Expand documentation to clarify pin notation and Servo usage (#2326)
1 parent cde5fe3 commit 94c9932

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/digital.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Board-Specific Pins
66
The Raspberry Pi Pico RP2040 chip supports up to 30 digital I/O pins,
77
however not all boards provide access to all pins.
88

9+
Pin Notation
10+
------------
11+
When using Analog or Digital I/Os, if you supply an integer it specifies the RP2040 GPIO pin to use. Using Dx or Ax notation (for example, D4 or A3) may be necessary on boards without a direct PCB pin to GPIO mapping.
12+
913
Input Modes
1014
-----------
1115
The Raspberry Pi Pico has 3 Input modes settings for use with `pinMode`: `INPUT`, `INPUT_PULLUP` and `INPUT_PULLDOWN`

docs/servo.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ require the use of a PIO machine.
1111
See the Arduino standard
1212
`Servo documentation <https://www.arduino.cc/reference/en/libraries/servo/>`_
1313
for detailed usage instructions. There is also an included ``sweep`` example.
14+
15+
Pulse Width Defaults
16+
--------------------
17+
The defaults in the Servo library are conservatively set to avoid damage in the case of over-driving. The pulse widths individual servos, especially the no-name or clones, occasionally need tweaking.
18+
19+
You can set the min and max servo pulse width in the attach command, with default values used in most Arduino cores of 540/2400:
20+
```myServo.attach(D3, 540, 2400)```

0 commit comments

Comments
 (0)