State Of Gyro Control Sate Of Servos

I have the code for a gyro which displays the rotation rate on the Serial Monitor and for controlling the position of a servo. How to I get one to work with the other? I want to make the gyro control several servos that are placed at the corners of a cube. What would the basic structure of such a code be that would cause one to enteract with the other. So, for example the gyro would recognize where is level and compare that to its current orientation and the arduino would send a signal to the servos which are connected the the conrners of the face of the cube which is facing the ground. Please don't type up all the code for me, I want to really learn how. Thanks.

You need to create a sketch that initialises both sets of hardware and contains both sets of code.

The code that reads the accelerometer should give you your rotation rate.

You need to decide what position(s) you want to move the servos to based on that input. How you do that is entirely up to you.

Having decided, you use the Servo API you're already familiar with to move the servos to those positions.

Thanks!