File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,23 @@ Use the :ref:`machine.Pin <machine.Pin>` class::
160
160
161
161
p4 = Pin(4, Pin.IN, Pin.PULL_UP) # enable internal pull-up resistor
162
162
p5 = Pin(5, Pin.OUT, value=1) # set pin high on creation
163
+ p6 = Pin(6, Pin.OUT, drive=Pin.DRIVE_HIGH) # set maximum drive strength
163
164
164
165
Available Pins are from the following ranges (inclusive): 0-19, 21-23, 25-27, 32-39.
165
166
These correspond to the actual GPIO pin numbers of ESP32 chip. Note that many
166
167
end-user boards use their own adhoc pin numbering (marked e.g. D0, D1, ...).
167
168
For mapping between board logical pins and physical chip pins consult your board
168
169
documentation.
169
170
171
+ Four drive strengths are supported, using the ``drive `` keyword argument to the
172
+ ``Pin() `` constructor or ``Pin.init() `` method, with different corresponding
173
+ safe maximum source/sink currents and approximate internal driver resistances:
174
+
175
+ - ``Pin.DRIVE_WEAK ``: 5mA / 130 ohm
<
6625
td data-grid-cell-id="diff-c175499d852d6b788735a5e714554ae0f098637cfe57e5c7f3e02ae6e9f5d0cf-169-176-0" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">
176
+ - ``Pin.DRIVE_LOW ``: 10mA / 60 ohm
177
+ - ``Pin.DRIVE_MED ``: 20mA / 30 ohm
178
+ - ``Pin.DRIVE_HIGH ``: 40mA / 15 ohm
179
+
170
180
Notes:
171
181
172
182
* Pins 1 and 3 are REPL UART TX and RX respectively
You can’t perform that action at this time.
0 commit comments