mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-15 02:54:52 +00:00
doc/pupdevices/InfraredSensor: 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,14 +4,6 @@ Infrared Sensor
|
||||
.. figure:: ../../api/images/sensor_proximity.png
|
||||
:width: 35 %
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Measuring distance, object count, and reflection**
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_infrared/basics.py
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.InfraredSensor
|
||||
:no-members:
|
||||
|
||||
@@ -20,3 +12,12 @@ Infrared Sensor
|
||||
.. automethod:: pybricks.pupdevices.InfraredSensor.reflection
|
||||
|
||||
.. automethod:: pybricks.pupdevices.InfraredSensor.count
|
||||
|
||||
Examples
|
||||
-------------------
|
||||
|
||||
Measuring distance, object count, and reflection
|
||||
************************************************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/pup/sensor_infrared/basics.py
|
||||
|
||||
Reference in New Issue
Block a user