mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
The Display class is from Pybricks MicroPython 1.0 and has been replaced by the Image class.
29 lines
692 B
Python
29 lines
692 B
Python
"""LEGO® Programmable Hubs."""
|
|
from enum import Enum
|
|
from .builtins import Speaker, 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()
|
|
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()
|