How to combine coding for accelerometer and servo at the same time

I have tried combining servo sweep example coding into the mpu 6050 uncalibrated coding, and the result is the graph does not give any results and here are the two codings (for servo i used the sweep coding). I want the servo to rotate 180 degree back and forth, at the same time the accelerometer shows me the result through serial plotter. Please help me :confused:

MPU6050_raw_uncalibrated.ino (4.09 KB)

That's just the MPU6050 example code, I cannot see any try from your side to combine the functionality. If you expect us to do your job you misunderstood the idea of that forum. It's to help you, not to make your job for free.

This is how i combine it, i don’t really have the knowledge of combining accelerometer coding.

MPU6050_raw_uncalibratedcombine.ino (4.82 KB)

I would expect that sketch to print out the MPU values and the turn the servo over the whole half round and back. What did it actually?

If the servo doesn’t move it’s probably not wired correctly. Please post a wiring diagram (including power side!).

Post the serial output you get.