mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
16 lines
327 B
Python
16 lines
327 B
Python
# ExampleHub = TechnicHub PrimeHub
|
|
from pybricks.hubs import ExampleHub
|
|
from pybricks.tools import wait
|
|
|
|
# Initialize the hub.
|
|
hub = ExampleHub()
|
|
|
|
# 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)
|