mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 09:05:07 +00:00
This way we don't have to commit the generated scripts. While we do this, rename ExampleHub to ThisHub so that the common scripts can actually run.
18 lines
399 B
Python
18 lines
399 B
Python
# ThisHub = MoveHub CityHub TechnicHub PrimeHub EssentialHub
|
|
from pybricks.hubs import ThisHub
|
|
from pybricks.parameters import Color
|
|
from pybricks.tools import wait
|
|
|
|
# Initialize the hub
|
|
hub = ThisHub()
|
|
|
|
# Keep blinking red on and off.
|
|
hub.light.blink(Color.RED, [500, 500])
|
|
|
|
wait(10000)
|
|
|
|
# Keep blinking green slowly and then quickly.
|
|
hub.light.blink(Color.GREEN, [500, 500, 50, 900])
|
|
|
|
wait(10000)
|