Files
pybricks-api/examples/pup/hub_inventorhub/display_pixel.py
T
Laurens Valk 92311b65fb examples/pup/hub_primehub: no need to call off()
The animation is now cleared automatically when invoking the pixel method, so there's no need to call this manually anymore.

See https://github.com/pybricks/support/issues/195
2021-01-12 16:32:20 +01:00

18 lines
368 B
Python

from pybricks.hubs import InventorHub
from pybricks.tools import wait
# Initialize the hub.
hub = InventorHub()
# Turn on the pixel at row 1, column 2.
hub.display.pixel(1, 2)
wait(2000)
# Turn on the pixel at row 2, column 4, at 50% brightness.
hub.display.pixel(2, 4, 50)
wait(2000)
# Turn off the pixel at row 1, column 2.
hub.display.pixel(1, 2, 0)
wait(2000)