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