mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
48 lines
1.0 KiB
ReStructuredText
48 lines
1.0 KiB
ReStructuredText
Move Hub
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. _fig_movehub:
|
|
|
|
.. figure:: ../../api/images/movehub_label.png
|
|
:height: 15 em
|
|
|
|
.. autoclass:: pybricks.hubs.MoveHub
|
|
:no-members:
|
|
|
|
.. rubric:: Using the hub status light
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.light.on
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.light.off
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.light.blink
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.light.animate
|
|
|
|
.. rubric:: Using the IMU
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.imu.up
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.imu.acceleration
|
|
|
|
.. rubric:: Using the battery
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.battery.voltage
|
|
|
|
.. automethod:: pybricks.hubs::MoveHub.battery.current
|
|
|
|
Status light examples
|
|
---------------------
|
|
|
|
Turning the light on and off
|
|
******************************
|
|
|
|
.. literalinclude::
|
|
../../../examples/pup/hub_movehub/light_off.py
|
|
|
|
Making the light blink
|
|
******************************
|
|
|
|
.. literalinclude::
|
|
../../../examples/pup/hub_movehub/light_blink.py
|