mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
In the long run, this page needs to be split up just like pupdevices. At this time, the nxtdevices page has only one example, so we simply remove the toggle header.
96 lines
2.1 KiB
ReStructuredText
96 lines
2.1 KiB
ReStructuredText
:mod:`nxtdevices <pybricks.nxtdevices>` -- NXT Devices
|
|
======================================================
|
|
|
|
.. automodule:: pybricks.nxtdevices
|
|
:no-members:
|
|
|
|
NXT Motor
|
|
^^^^^^^^^^^^^^^^
|
|
This motor works just like a LEGO MINDSTORMS EV3 Large Motor. You can use it in
|
|
your programs using the :mod:`Motor <.ev3devices>` class.
|
|
|
|
NXT Touch Sensor
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_touch.png
|
|
:width: 18 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.TouchSensor
|
|
:no-members:
|
|
|
|
.. automethod:: pybricks.nxtdevices.TouchSensor.pressed
|
|
|
|
NXT Light Sensor
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_light.png
|
|
:width: 18 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.LightSensor
|
|
|
|
NXT Color Sensor
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_color.png
|
|
:width: 18 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.ColorSensor
|
|
:no-members:
|
|
|
|
.. automethod:: pybricks.nxtdevices.ColorSensor.color
|
|
|
|
.. automethod:: pybricks.nxtdevices.ColorSensor.ambient
|
|
|
|
.. automethod:: pybricks.nxtdevices.ColorSensor.reflection
|
|
|
|
.. automethod:: pybricks.nxtdevices.ColorSensor.rgb
|
|
|
|
.. rubric:: Built-in light
|
|
|
|
This sensor has a built-in light. You can make it red, green, blue, or turn
|
|
it off.
|
|
|
|
.. automethod:: pybricks.nxtdevices::ColorSensor.light.on
|
|
|
|
.. automethod:: pybricks.nxtdevices::ColorSensor.light.off
|
|
|
|
NXT Ultrasonic Sensor
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_ultrasonic.png
|
|
:width: 24 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.UltrasonicSensor
|
|
|
|
NXT Sound Sensor
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_sound.png
|
|
:width: 18 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.SoundSensor
|
|
|
|
NXT Temperature Sensor
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/sensor_nxt_temp.png
|
|
:width: 32 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.TemperatureSensor
|
|
|
|
NXT Energy Meter
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../api/images/energymeter.png
|
|
:width: 30 %
|
|
|
|
.. autoclass:: pybricks.nxtdevices.EnergyMeter
|
|
|
|
Vernier Adapter
|
|
^^^^^^^^^^^^^^^^^
|
|
.. autoclass:: pybricks.nxtdevices.VernierAdapter
|
|
|
|
**Example: Using the Surface Temperature Sensor.**
|
|
|
|
.. literalinclude:: ../../examples/ev3/vernier_surface_temperature/main.py
|