Skip to main content

update_angles()

Description#

Reads angular speeds and updates the list of angles: The first 3 are angles produced from the gyroscope readings.
X angle, Y angle and Z angle in degrees.
The next 2 angles are produced by finding the tilt with respect to gravity.
X and Y acceleration angles in degrees. Work well if Zumi's wheels point to the floor
The next 2 angles are the complementary filtered angles are produced by combining both gyroscope and accelerometer angles for the x and y axis.
The next 3 are the rotation angles which are produced using the accelerometer.
rotation along X, Y and Z with respect to gravity.
The last one is the tilt state.

Syntax#

update_angles()

Parameters#

None

Returns#

List [Gyro x,Gyro y,Gyro z,Acc x,Acc y,Comp x,Comp y,Rot_x,Rot_y,Rot_z,tilt_state]

Example Code#
Python#
#Python code
from zumi.zumi import Zumi
import time
zumi = Zumi()
for i in range(0,100):
angles = zumi.update_angles()
z_angle = angles[2]
print(z_angle)
print(" done ")