Shop OBEX P1 Docs P2 Docs Learn Events
boe & servo problem — Parallax Forums

boe & servo problem

ArchiverArchiver Posts: 46,084
edited 2001-10-30 02:46 in General Discussion
Tad-

Your b2 variable is a byte variable. As such, it can only hold a
value from 0 through 255. On the BS2 and beyond, it's better to
declare and size your own variables than to use b1, w1, etc.
Suggested modification:


i VAR WORD
j VAR BYTE

again:
for i = 500 to 1000
for j = 1 to 5
pulsout 15, i
pause 15
next
next
goto again


Regards,

Steve

On 29 Oct 01 at 19:17, tadspambait@y... wrote:

> ...i'm attempting to use parallax servos with a BOE Rev. B. I
> hooked up the servos to the 3-pin ports on the BOE, and used
> the following tester code (modified from scott edwards' original):
>
> again:
> for b2 = 500 to 1000
> for b3 = 1 to 5
> pulsout 15, b2
> pause 15
> next
> next
> goto again

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 19:17
    howdy folks:

    first off, i should admit that i am a complete newbie, and am
    prone to asking silly questions... your indulgance is appreciated
    ;-)

    i'm attempting to use parallax servos with a BOE Rev. B. I
    hooked up the servos to the 3-pin ports on the BOE, and used
    the following tester code (modified from scott edwards' original):

    again:
    for b2 = 500 to 1000
    for b3 = 1 to 5
    pulsout 15, b2
    pause 15
    next
    next
    goto again

    the servos have behaved erratically, or not at all.

    i have tried several servos & each of the 4 ports (corresponding
    to pins 12, 13, 14, 15). i'm fairly confident that i have them
    connected properly, so i assume the problem is either with my
    code, or with the servos themselves (or with the bs2, but that
    seems to be operating correctly with other applications).

    does the code look ok? if so, any suggestions on other ways of
    testing the servos?

    thanks,
    tad
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 21:17
    Are you useing it off the power supply? If you are then you just fried
    them. email parallax. I had that same problem too. The power supply is
    giving out too much voltage and it is frying it. parallax should send
    you a new one.

    from
    Tad

    (hmmmmm same name. I wonder......)

    tadspambait@y... wrote:

    >howdy folks:
    >
    >first off, i should admit that i am a complete newbie, and am
    >prone to asking silly questions... your indulgance is appreciated
    >;-)
    >
    >i'm attempting to use parallax servos with a BOE Rev. B. I
    >hooked up the servos to the 3-pin ports on the BOE, and used
    >the following tester code (modified from scott edwards' original):
    >
    >again:
    >for b2 = 500 to 1000
    > for b3 = 1 to 5
    > pulsout 15, b2
    > pause 15
    > next
    >next
    >goto again
    >
    >the servos have behaved erratically, or not at all.
    >
    >i have tried several servos & each of the 4 ports (corresponding
    >to pins 12, 13, 14, 15). i'm fairly confident that i have them
    >connected properly, so i assume the problem is either with my
    >code, or with the servos themselves (or with the bs2, but that
    >seems to be operating correctly with other applications).
    >
    >does the code look ok? if so, any suggestions on other ways of
    >testing the servos?
    >
    >thanks,
    >tad
    >
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-30 02:46
    i hope you're right, since the other reply to my post indicates that
    the servos are fried!

    i guess the bs compiler doesn't throw exceptions?

    thanks for your help,
    tad

    --- In basicstamps@y..., "S Parkis" <parkiss@e...> wrote:
    > Tad-
    >
    > Your b2 variable is a byte variable. As such, it can only hold a
    > value from 0 through 255. On the BS2 and beyond, it's better to
    > declare and size your own variables than to use b1, w1, etc.
    > Suggested modification:
    >
    >
    > i VAR WORD
    > j VAR BYTE
    >
    > again:
    > for i = 500 to 1000
    > for j = 1 to 5
    > pulsout 15, i
    > pause 15
    > next
    > next
    > goto again
    >
    >
    > Regards,
    >
    > Steve
    >
    > On 29 Oct 01 at 19:17, tadspambait@y... wrote:
    >
    > > ...i'm attempting to use parallax servos with a BOE Rev. B. I
    > > hooked up the servos to the 3-pin ports on the BOE, and
    used
    > > the following tester code (modified from scott edwards'
    original):
    > >
    > > again:
    > > for b2 = 500 to 1000
    > > for b3 = 1 to 5
    > > pulsout 15, b2
    > > pause 15
    > > next
    > > next
    > > goto again
Sign In or Register to comment.