Hi Guys I´ve written a simple python script, which activates a particular RC output (RC5 in this case) to set a connected servo to a specific angle, waits 2 seconds then to another angle then repeats.

Everything works perfectly in Manual mode.The servo connected to RC5 fires away as it should. However when in AUTO or STABILIZE mode, the Aileron and Elevator servos start moving as well and I can´t figure out why and was wondering if anyone could point me in the right direction.

My code is below in case anyone fancies a look

Thanks!!

Nick

import sys

from math import*
import clr
import time
import MissionPlanner

n = 0
while True:
time.sleep(2)
Script.SendRC(5,1150,True)#servo in pos 1
n += 1
print "== SERVO IN POS 1"
print "========================"
time.sleep(2)
Script.SendRC(5,1400,True)#servo in pos 2
n += 1
print "== SERVO IN POS 2"
print "========================"

Views: 188

Reply to This

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service