Glitch in my UAV's aileron servo
karthik9
Posts: 6
i want to stabilize my ailerons using MMA7455 accelerometer. For this im using 2 BASIC STAMPS where
-one is used for getting accelerometer data ,converting the data into pulse duration and sends it to the second stamp using SEROUT
-The second stamp is only for controlling aileron servo
Now when ever there is change in accelerometer data there is a glitch in the servo, and then comes back to the position.
please help me to avoid the glitch.
here is the code that i have used.
-one is used for getting accelerometer data ,converting the data into pulse duration and sends it to the second stamp using SEROUT
-The second stamp is only for controlling aileron servo
Now when ever there is change in accelerometer data there is a glitch in the servo, and then comes back to the position.
please help me to avoid the glitch.
here is the code that i have used.
bs2
164B
Comments
You have it defined as a word variable but the the serin is receiving a byte value.
Secondly, are you providing an updated value often enough to satisfy the servo's needs? An update about every 20mSec is usually required.
cheers,