@@ -202,10 +202,15 @@ its own to that.
202
202
Return ``True `` if the pin is being touched with a finger, otherwise
203
203
return ``False ``.
204
204
205
+ .. py :method :: set_touch_mode(value)
206
+
205
207
.. note ::
206
- The default touch mode for the pins on the edge connector is
208
+ The default touch mode for the pins on the edge connector is
207
209
`resistive `. The default for the logo pin **V2 ** is `capacitive `.
208
210
211
+ Set the touch mode for the given pin. Value can be either ``CAPACITIVE ``
212
+ or ``RESISTIVE ``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE) ``.
213
+
209
214
**Resistive touch **
210
215
This test is done by measuring how much resistance there is between the
211
216
pin and ground. A low resistance gives a reading of ``True ``. To get
@@ -218,15 +223,6 @@ its own to that.
218
223
<https://www.allaboutcircuits.com/technical-articles/introduction-to-capacitive-touch-sensing> `_
219
224
does not require you to make a ground connection as part of a circuit.
220
225
221
- .. py :method :: set_touch_mode(value)
222
-
223
- .. note ::
224
- The default touch mode for the pins on the edge connector is
225
- `resistive `. The default for the logo pin **V2 ** is `capacitive `.
226
-
227
- Set the touch mode for the given pin. Value can be either ``CAPACITIVE ``
228
- or ``RESISTIVE ``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE) ``.
229
-
230
226
The pull mode for a pin is automatically configured when the pin changes to an
231
227
input mode. Input modes are when you call ``read_analog `` / ``read_digital `` /
232
228
``is_touched ``. The default pull mode for these is, respectively, ``NO_PULL ``,
0 commit comments