I'm trying to turn my copter using a python script, but the copter is not turning.
Script.SendRC(4,1750, True) #yaw
while(cs.yaw < 300):
It stays in the while loop forever because it is not turning, so does someone know how to make it turn?
can you please tell me on which air frame you mounted your APM?? also can you please tell me the web page where I can get the above mentioned python scrip?
The frame depends on your application, so I don't think knowing what frame I used will help you, but we used a vulcan octaframe.
I made that code myself.
You should monitor the yaw value in the while loop to see if it is changed or not. If it is not changed, may be another value for throttle and/or yaw PWM should be set.
Actually the problem was that the scripts won't make the copter turn unless it is in the air, but I was testing on the ground. But it actually worked in the air.
So how did you check whether the copter was actually in the air or not? I'm a bit curious.
I think you misunderstood?
The first time I tried it, I ran the script while the copter was on the ground, and manually turned the copter, but didn't notice any difference in motor pwms.
Later, I actually flew it in the air first, and then ran the script, which actually made it turn.
Thanks for your explanation. Now I understand.
In fact, you have suggested me one good way to check if the drone starts leaving the ground. It can be done by monitoring the yaw.
Shouldn't you check the altitude instead to tell if it leaves the ground?