Accelerometer to guide a physical spinning gyro

I would like a sketch for a MPU 6050 accelerometer to a Stepper Motor and Arduino setup to control a physical spinning gyro, keeping it level by controlling Yaw (left and right movement). Please advise.