@@ -202,10 +202,20 @@ 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 :: was_touched()
206
+
207
+ Returns ``True `` or ``False `` to indicate if the pin was touched
208
+ since the device started or since the last time this method was called.
209
+
210
+ .. py :method :: set_touch_mode(value)
211
+
205
212
.. note ::
206
- The default touch mode for the pins on the edge connector is
213
+ The default touch mode for the pins on the edge connector is
207
214
`resistive `. The default for the logo pin **V2 ** is `capacitive `.
208
215
216
+ Set the touch mode for the given pin. Value can be either ``CAPACITIVE ``
217
+ or ``RESISTIVE ``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE) ``.
218
+
209
219
**Resistive touch **
210
220
This test is done by measuring how much resistance there is between the
211
221
pin and ground. A low resistance gives a reading of ``True ``. To get
@@ -217,20 +227,6 @@ its own to that.
217
227
using a finger as a conductor. `Capacitive touch
218
228
<https://www.allaboutcircuits.com/technical-articles/introduction-to-capacitive-touch-sensing> `_
219
229
does not require you to make a ground connection as part of a circuit.
220
-
221
- .. py :method :: was_touched()
222
-
223
- Returns ``True `` or ``False `` to indicate if the pin was touched
224
- since the device started or since the last time this method was called.
225
-
226
- .. py :method :: set_touch_mode(value)
227
-
228
- .. note ::
229
- The default touch mode for the pins on the edge connector is
230
- `resistive `. The default for the logo pin **V2 ** is `capacitive `.
231
-
232
- Set the touch mode for the given pin. Value can be either ``CAPACITIVE ``
233
- or ``RESISTIVE ``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE) ``.
234
230
235
231
The pull mode for a pin is automatically configured when the pin changes to an
236
232
input mode. Input modes are when you call ``read_analog `` / ``read_digital `` /
0 commit comments