mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
doc/pupdevices/ForceSensor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
This commit is contained in:
@@ -4,22 +4,6 @@ Force Sensor
|
||||
.. figure:: ../../api/images/sensor_force.png
|
||||
:width: 35 %
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide examples**
|
||||
|
||||
|
||||
**Example 1: Measuring force and movement**
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_force/basics.py
|
||||
|
||||
|
||||
**Example 2: Measuring peak force**
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_force/peak.py
|
||||
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.ForceSensor
|
||||
:no-members:
|
||||
|
||||
@@ -30,3 +14,18 @@ Force Sensor
|
||||
.. automethod:: pybricks.pupdevices.ForceSensor.pressed
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ForceSensor.touched
|
||||
|
||||
Examples
|
||||
-------------------
|
||||
|
||||
Measuring force and movement
|
||||
****************************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_force/basics.py
|
||||
|
||||
Measuring peak force
|
||||
********************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_force/peak.py
|
||||
|
||||
Reference in New Issue
Block a user