mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
rename hub4 to cityhub
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
:mod:`cityhub` -- LEGO® Power Functions 2.0 City Hub
|
||||
=====================================================
|
||||
|
||||
.. automodule:: cityhub
|
||||
:no-members:
|
||||
|
||||
|
||||
Light
|
||||
-----
|
||||
|
||||
.. automethod:: cityhub.light.color
|
||||
|
||||
Example::
|
||||
|
||||
# Make the light red
|
||||
cityhub.light.color(Color.RED)
|
||||
|
||||
# Wait
|
||||
wait(1000)
|
||||
|
||||
# Turn the light off
|
||||
cityhub.light.off()
|
||||
|
||||
|
||||
.. automethod:: cityhub.light.off
|
||||
|
||||
.. automethod:: cityhub.light.brightness
|
||||
|
||||
Battery
|
||||
-------
|
||||
|
||||
.. automethod:: cityhub.battery.voltage
|
||||
|
||||
.. automethod:: cityhub.battery.current
|
||||
@@ -1,34 +0,0 @@
|
||||
:mod:`hub4` -- LEGO® Power Functions 2.0 Hub 4
|
||||
=====================================================
|
||||
|
||||
.. automodule:: hub4
|
||||
:no-members:
|
||||
|
||||
|
||||
Light
|
||||
-----
|
||||
|
||||
.. automethod:: hub4.light.color
|
||||
|
||||
Example::
|
||||
|
||||
# Make the light red
|
||||
hub4.light.color(Color.RED)
|
||||
|
||||
# Wait
|
||||
wait(1000)
|
||||
|
||||
# Turn the light off
|
||||
hub4.light.off()
|
||||
|
||||
|
||||
.. automethod:: hub4.light.off
|
||||
|
||||
.. automethod:: hub4.light.brightness
|
||||
|
||||
Battery
|
||||
-------
|
||||
|
||||
.. automethod:: hub4.battery.voltage
|
||||
|
||||
.. automethod:: hub4.battery.current
|
||||
+1
-1
@@ -22,7 +22,7 @@ Intro
|
||||
:hidden:
|
||||
|
||||
movehub
|
||||
hub4
|
||||
cityhub
|
||||
lpf2devices
|
||||
parameters
|
||||
tools
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""LEGO® Power Functions 2.0 Hub 4."""
|
||||
"""LEGO® Power Functions 2.0 City Hub."""
|
||||
|
||||
from _common import Battery, ColorLight
|
||||
|
||||
Reference in New Issue
Block a user