Shop OBEX P1 Docs P2 Docs Learn Events
Glitch in my UAV's aileron servo — Parallax Forums

Glitch in my UAV's aileron servo

karthik9karthik9 Posts: 6
edited 2012-03-15 10:03 in BASIC Stamp
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.

Comments

  • SRLMSRLM Posts: 5,045
    edited 2012-03-15 10:00
    I think you'll need to post your other code as well.
  • stamptrolstamptrol Posts: 1,731
    edited 2012-03-15 10:03
    Two things to check. What is the range of values for 'accel'?

    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,
Sign In or Register to comment.