You are on page 1of 1

loop()

read bluetooth speed/pid change commands


1. get angles(yaw, pitch, roll) from gyro
(desired yaw pitch rol = 0 0 0)
calculate pids for angles
calculate the rotational speed in 3 axis (for yaw, pitch, roll)
(these are the desired rotational speeds)
2. get current rotational speeds from gyro
calculate pids for rotational speeds
calculate desired/target speed of each motor according to the rotational speeds

end loop

You might also like