mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
34 lines
596 B
ReStructuredText
34 lines
596 B
ReStructuredText
:mod:`movehub` -- LEGO® Power Functions 2.0 Move Hub
|
|
======================================================
|
|
|
|
.. automodule:: pybricks.movehub
|
|
:no-members:
|
|
|
|
Light
|
|
-----
|
|
|
|
.. automethod:: pybricks.movehub.light.on
|
|
|
|
Example::
|
|
|
|
# Make the light red
|
|
movehub.light.on(Color.RED)
|
|
|
|
# Wait
|
|
wait(1000)
|
|
|
|
# Turn the light off
|
|
movehub.light.off()
|
|
|
|
|
|
.. automethod:: pybricks.movehub.light.off
|
|
|
|
.. automethod:: pybricks.movehub.light.rgb
|
|
|
|
Battery
|
|
-------
|
|
|
|
.. automethod:: pybricks.movehub.battery.voltage
|
|
|
|
.. automethod:: pybricks.movehub.battery.current
|