Shop OBEX P1 Docs P2 Docs Learn Events
Trying desperately to move a servo — Parallax Forums

Trying desperately to move a servo

CheechCheech Posts: 30
edited 2007-09-08 18:02 in BASIC Stamp
I have been trying for several hours to do a very basic thing, move a servo with my BS2p40 and a Demo Board.· I have a handful·of servos from my RC Heli, and I can't make a single one work right.· I did a forum search looking for code and they are all about the same, a loop with PULSOUT between 100 and 200 with a delay of like 10-50 whatever units it uses.

I am using the power off the demo board, but have also tried a separate batt back and connecting the grounds.· Every time I run the program the servo twitches really fast.· I think its trying to go out of bounds because it is also drawing alot of power making the LED on my demo board dim.

Here is the last code sample I've tried, they all do the same tho:
DO
  PULSOUT 0, 100
  PAUSE 50
LOOP

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-09-08 18:02
    Hi Cheech, the duration of your PULSOUT should lay between 1mS and 2mS. Each unit of PULSOUT =0.8 microseconds for the BS2p or 2microseconds for the BS2. So for the value of a BS2p·PULSOUT should not exceed a min of 1250 or max of 2500

    PULSOUT 0,1875 should be mid point

    Jeff T.
Sign In or Register to comment.