Skip to content

Commit

Permalink
docs: Move resistive/capacitive description to set_touch_mode().
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed May 7, 2024
1 parent 2505216 commit 0acb4ec
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions docs/pin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,15 @@ its own to that.
Return ``True`` if the pin is being touched with a finger, otherwise
return ``False``.

.. py:method:: set_touch_mode(value)
.. note::
The default touch mode for the pins on the edge connector is
The default touch mode for the pins on the edge connector is
`resistive`. The default for the logo pin **V2** is `capacitive`.

Set the touch mode for the given pin. Value can be either ``CAPACITIVE``
or ``RESISTIVE``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE)``.

**Resistive touch**
This test is done by measuring how much resistance there is between the
pin and ground. A low resistance gives a reading of ``True``. To get
Expand All @@ -218,15 +223,6 @@ its own to that.
<https://www.allaboutcircuits.com/technical-articles/introduction-to-capacitive-touch-sensing>`_
does not require you to make a ground connection as part of a circuit.

.. py:method:: set_touch_mode(value)
.. note::
The default touch mode for the pins on the edge connector is
`resistive`. The default for the logo pin **V2** is `capacitive`.

Set the touch mode for the given pin. Value can be either ``CAPACITIVE``
or ``RESISTIVE``. For example, ``pin0.set_touch_mode(pin0.CAPACITIVE)``.

The pull mode for a pin is automatically configured when the pin changes to an
input mode. Input modes are when you call ``read_analog`` / ``read_digital`` /
``is_touched``. The default pull mode for these is, respectively, ``NO_PULL``,
Expand Down

0 comments on commit 0acb4ec

Please sign in to comment.