Shop OBEX P1 Docs P2 Docs Learn Events
Why is the PAUSE needed? — Parallax Forums

Why is the PAUSE needed?

alexopricealexoprice Posts: 20
edited 2005-01-11 07:42 in Robotics
I am learing using the Boe-bot and was just wondering why the continuous rotation servos need to have a pause of 20ms between pulses. When i ran the following code, the bot went forward for a bit, beeped and then went forward again even though there was no pause. The only difference was that there needed to be more pulses to move the same distance. The only reason the beep is there is so that i would know when it switched form pause to no pause. Any explanation would be appreciated - alex


FOR pulsecount=1TO 90
· PULSOUT 13,850
· PULSOUT 12,650
· PAUSE 20
NEXT

FREQOUT 4,2000,3000

FOR pulsecount=1TO 900
· PULSOUT 13,850
· PULSOUT 12,650
NEXT

Comments

  • dandreaedandreae Posts: 1,375
    edited 2005-01-06 23:17
    Hello,

    If you look in chapter 2 of the Robotics With the Boe-Bot·manual version 2.1 it will explain in detail
    why the PAUSE 20 is required.· Basically it allows the coil to respond inside the DC motor of the servo.· If you don't use the PAUSE 20 it can cause jitters in the servo.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    www.parallax.com

    ·
  • lrohnlrohn Posts: 33
    edited 2005-01-11 07:42
    Hello Alexoprice,

    There is also a 2 second duration in your freqout command.

    Remember, here is the FREQOUT command's syntax:

    FREQOUT Pin, DURATION, FREQ1 {, FREQ2}

    While it is sending a 3Khz tone to your piezospeaker on PIN 4 it cannot pulse the servos with your duration argument and thus they stop moving for that period of time.

    Luke
Sign In or Register to comment.