mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
This page was getting very long, so split it up for easier navigation (#33).
23 lines
574 B
ReStructuredText
23 lines
574 B
ReStructuredText
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:
|
|
|
|
.. automethod:: pybricks.pupdevices.InfraredSensor.distance
|
|
|
|
.. automethod:: pybricks.pupdevices.InfraredSensor.reflection
|
|
|
|
.. automethod:: pybricks.pupdevices.InfraredSensor.count
|