mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
This duplicates the Image class documentation In pybricks.ev3devices as EV3Bricks.screen.
30 lines
725 B
Python
30 lines
725 B
Python
"""LEGO® Programmable Hubs."""
|
|
from enum import Enum
|
|
from .builtins import Speaker, Display, Battery, ColorLight, KeyPad
|
|
from .resources import Image
|
|
|
|
|
|
class EV3Brick:
|
|
"""LEGO® MINDSTORMS® EV3 Brick."""
|
|
Port = Enum('Port', ['A', 'B', 'C', 'D', 'S1', 'S2', 'S3', 'S4'])
|
|
screen = Image('_screen_')
|
|
speaker = Speaker()
|
|
display = Display()
|
|
battery = Battery()
|
|
light = ColorLight()
|
|
buttons = KeyPad()
|
|
|
|
|
|
class MoveHub():
|
|
"""LEGO® Powered Up Move Hub."""
|
|
Port = Enum('Port', ['A', 'B', 'C', 'D'])
|
|
battery = Battery()
|
|
light = ColorLight()
|
|
|
|
|
|
class CityHub():
|
|
"""LEGO® Powered Up City Hub."""
|
|
Port = Enum('Port', ['A', 'B'])
|
|
battery = Battery()
|
|
light = ColorLight()
|