mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 17:46:19 +00:00
15 lines
288 B
Python
15 lines
288 B
Python
from pybricks.hubs import PrimeHub
|
|
from pybricks.tools import wait
|
|
|
|
# Initialize the hub.
|
|
hub = PrimeHub()
|
|
|
|
# Get the acceleration vector.
|
|
print(hub.imu.acceleration())
|
|
|
|
# Get the angular velocity vector.
|
|
print(hub.imu.angular_velocity())
|
|
|
|
# Wait so we can see what we printed
|
|
wait(5000)
|