Servo.py can't work while APM is running

I run python script like the Servo.py example on the raspberry, however I always get “APM is running, you can’t run example”. If I stop arducopter by “sudo systemctl stop arducopter”, the Servo.py run fine. How could I solve this problem? I want to make serve rotate while drone is flying.

Hi @yue.cheng90,

Examples programs don’t work when APM is running, because they use the same resources. It can lead to conflicts and distort values.

Please, check the ArduPilot docs, you can control servos directly from APM.