mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
15 lines
282 B
Python
15 lines
282 B
Python
# ExampleHub = TechnicHub PrimeHub
|
|
from pybricks.hubs import ExampleHub
|
|
from pybricks.tools import wait
|
|
|
|
# Initialize the hub.
|
|
hub = ExampleHub()
|
|
|
|
while True:
|
|
# Read the tilt values.
|
|
pitch, roll = hub.imu.tilt()
|
|
|
|
# Print the result.
|
|
print(pitch, roll)
|
|
wait(200)
|