BSIISX - Connecting Servo''s Correctly
Nick:
I am sure that your problem has to do with the way that variables are
handled with the SX. This code is for a BS1. One of the SX gurus on this
list can help...I am not familiar with the SX.
Good luck,
Ray McArthur
Original Message
From: Nick Messenger <nick@m...>
To: <basicstamps@egroups.com>
Sent: Saturday, October 21, 2000 1:53 PM
Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> Ah, I tried the new code but I still get an error message.
>
> The message says:-
>
> Error exptected ':' or end-of-line.
>
> And on the ninth line down, B2 is highlighted?
>
> Does this make any sense to anyone?
>
>
>
Original Message
> From: Nick Messenger <nick@m...>
> To: <basicstamps@egroups.com>
> Sent: Saturday, October 21, 2000 4:22 PM
> Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
>
>
> > I have tried this code to test my servo on a BS2SX but it is coming back
> > with a message saying incorrect variable?
> >
> > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > >'TO TEST RC SERVOS
> > > > >DIRS=%11111111
> > > > >LOW 0
> > > > >AGAIN:
> > > > >FOR B2=100 TO 200 STEP 2
> > > > > PULSOUT 0,B2
> > > > > PAUSE 15
> > > > >NEXT B2 (incorrect variable)
> > > > >FOR B2=200 TO 100 STEP -2
> > > > > PULSOUT 0,B2
> > > > > PAUSE 15
> > > > > NEXT B2
> > > > >'DEBUG "AGAIN"
> > > > >PAUSE 1000
> > > > >GOTO AGAIN
> >
Original Message
> > From: Ray McArthur <rjmca@u...>
> > To: <basicstamps@egroups.com>
> > Sent: Saturday, October 21, 2000 1:38 AM
> > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> >
> > > Nick:
> > > You can use any Stamp pin and write your code for the pin you use. In
> the
> > > example code I sent, pin zero is driving the servo as determined by
the
> > > statement
> > > PULSOUT 0,B2
> > >
> > > Ray McArthur
> > >
Original Message
> > > From: Nick Messenger <nick@m...>
> > > To: <basicstamps@egroups.com>
> > > Sent: Friday, October 20, 2000 3:27 PM
> > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> > >
> > >
> > > > I'm new to Stamps and just trying to learn how to connect up two
hobby
> > > > servos to a BSIISX and program them with a simple code that I could
> > > > understand even though I have never used PBasic language before.
> > > > Does anyone have a short code that I could use to do this?
> > > >
> > > > If the red wire goes to +5 volts.
> > > > The Black goes to gnd.
> > > > And the White goes to your Stamp pin, can somebody tell me from my
> > diagram
> > > > below, which is the Stamp pin.
> > > >
> > > > TX PWR
> > > > RX GND
> > > > ATN RES
> > > > GND +5v
> > > > P0 P15
> > > > P1 P14
> > > > P2 P13
> > > > P3 P12
> > > > P4 P11
> > > > P5 P10
> > > > P6 P9
> > > > P7 P8
> > > >
> > > >
> > > >
Original Message
> > > > From: Jason 1 <plugger2@s...>
> > > > To: <basicstamps@egroups.com>
> > > > Sent: Friday, October 20, 2000 5:38 AM
> > > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> > > >
> > > >
> > > > > Original message from: "Ray McArthur" <rjmca@u...>
> > > > > >
> > > > > >Nick:
> > > > > >The red wire goes to +5 volts.
> > > > > >Black goes to gnd.
> > > > > >White goes to your Stamp pin.
> > > > > >
> > > > > >I advise a 1K resistor in series to the stamp pin, it doesn't
> effect
> > > > > the
> > > > > >servo and provides protection to the Stamp.
> > > > > >
> > > > > >Here is BS1 code that I have used to cycle servos back and forth.
> I
> > > > > am not
> > > > > >familiar with the SX, so you will have to convert the code. Pay
> > > > > special
> > > > > >attention to the PULSOUT...the SX probably uses different units
of
> > > > > time.
> > > > > >This program generates 1 to 2 millisecs with a BS1, (Pulsout
> > > > > 100=10us*100=1
> > > > > >millisec). Also, check on the Pause statement, I don't know if
> it's
> > > > > the
> > > > > >same for the SX. For the BS1, Pause 15 is a 15 millisec delay.
> Also
> > > > > make
> > > > > >sure your power supply can support the current drain of a servo.
> > > > > Many
> > > > > >problems show up on this list because the power supply bogs down
> when
> > > > > the
> > > > > >servo moves, resulting in a Stamp reset.
> > > > > >
> > > > > >Hope this helps,
> > > > > >Ray McArthur
> > > > > >
> > > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > > >'TO TEST RC SERVOS
> > > > > >DIRS=%11111111
> > > > > >LOW 0
> > > > > >AGAIN:
> > > > > >FOR B2=100 TO 200 STEP 2
> > > > > > PULSOUT 0,B2
> > > > > > PAUSE 15
> > > > > >NEXT B2
> > > > > >FOR B2=200 TO 100 STEP -2
> > > > > > PULSOUT 0,B2
> > > > > > PAUSE 15
> > > > > > NEXT B2
> > > > > >'DEBUG "AGAIN"
> > > > > >PAUSE 1000
> > > > > >GOTO AGAIN
I am sure that your problem has to do with the way that variables are
handled with the SX. This code is for a BS1. One of the SX gurus on this
list can help...I am not familiar with the SX.
Good luck,
Ray McArthur
Original Message
From: Nick Messenger <nick@m...>
To: <basicstamps@egroups.com>
Sent: Saturday, October 21, 2000 1:53 PM
Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> Ah, I tried the new code but I still get an error message.
>
> The message says:-
>
> Error exptected ':' or end-of-line.
>
> And on the ninth line down, B2 is highlighted?
>
> Does this make any sense to anyone?
>
>
>
Original Message
> From: Nick Messenger <nick@m...>
> To: <basicstamps@egroups.com>
> Sent: Saturday, October 21, 2000 4:22 PM
> Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
>
>
> > I have tried this code to test my servo on a BS2SX but it is coming back
> > with a message saying incorrect variable?
> >
> > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > >'TO TEST RC SERVOS
> > > > >DIRS=%11111111
> > > > >LOW 0
> > > > >AGAIN:
> > > > >FOR B2=100 TO 200 STEP 2
> > > > > PULSOUT 0,B2
> > > > > PAUSE 15
> > > > >NEXT B2 (incorrect variable)
> > > > >FOR B2=200 TO 100 STEP -2
> > > > > PULSOUT 0,B2
> > > > > PAUSE 15
> > > > > NEXT B2
> > > > >'DEBUG "AGAIN"
> > > > >PAUSE 1000
> > > > >GOTO AGAIN
> >
Original Message
> > From: Ray McArthur <rjmca@u...>
> > To: <basicstamps@egroups.com>
> > Sent: Saturday, October 21, 2000 1:38 AM
> > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> >
> > > Nick:
> > > You can use any Stamp pin and write your code for the pin you use. In
> the
> > > example code I sent, pin zero is driving the servo as determined by
the
> > > statement
> > > PULSOUT 0,B2
> > >
> > > Ray McArthur
> > >
Original Message
> > > From: Nick Messenger <nick@m...>
> > > To: <basicstamps@egroups.com>
> > > Sent: Friday, October 20, 2000 3:27 PM
> > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> > >
> > >
> > > > I'm new to Stamps and just trying to learn how to connect up two
hobby
> > > > servos to a BSIISX and program them with a simple code that I could
> > > > understand even though I have never used PBasic language before.
> > > > Does anyone have a short code that I could use to do this?
> > > >
> > > > If the red wire goes to +5 volts.
> > > > The Black goes to gnd.
> > > > And the White goes to your Stamp pin, can somebody tell me from my
> > diagram
> > > > below, which is the Stamp pin.
> > > >
> > > > TX PWR
> > > > RX GND
> > > > ATN RES
> > > > GND +5v
> > > > P0 P15
> > > > P1 P14
> > > > P2 P13
> > > > P3 P12
> > > > P4 P11
> > > > P5 P10
> > > > P6 P9
> > > > P7 P8
> > > >
> > > >
> > > >
Original Message
> > > > From: Jason 1 <plugger2@s...>
> > > > To: <basicstamps@egroups.com>
> > > > Sent: Friday, October 20, 2000 5:38 AM
> > > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> > > >
> > > >
> > > > > Original message from: "Ray McArthur" <rjmca@u...>
> > > > > >
> > > > > >Nick:
> > > > > >The red wire goes to +5 volts.
> > > > > >Black goes to gnd.
> > > > > >White goes to your Stamp pin.
> > > > > >
> > > > > >I advise a 1K resistor in series to the stamp pin, it doesn't
> effect
> > > > > the
> > > > > >servo and provides protection to the Stamp.
> > > > > >
> > > > > >Here is BS1 code that I have used to cycle servos back and forth.
> I
> > > > > am not
> > > > > >familiar with the SX, so you will have to convert the code. Pay
> > > > > special
> > > > > >attention to the PULSOUT...the SX probably uses different units
of
> > > > > time.
> > > > > >This program generates 1 to 2 millisecs with a BS1, (Pulsout
> > > > > 100=10us*100=1
> > > > > >millisec). Also, check on the Pause statement, I don't know if
> it's
> > > > > the
> > > > > >same for the SX. For the BS1, Pause 15 is a 15 millisec delay.
> Also
> > > > > make
> > > > > >sure your power supply can support the current drain of a servo.
> > > > > Many
> > > > > >problems show up on this list because the power supply bogs down
> when
> > > > > the
> > > > > >servo moves, resulting in a Stamp reset.
> > > > > >
> > > > > >Hope this helps,
> > > > > >Ray McArthur
> > > > > >
> > > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > > >'TO TEST RC SERVOS
> > > > > >DIRS=%11111111
> > > > > >LOW 0
> > > > > >AGAIN:
> > > > > >FOR B2=100 TO 200 STEP 2
> > > > > > PULSOUT 0,B2
> > > > > > PAUSE 15
> > > > > >NEXT B2
> > > > > >FOR B2=200 TO 100 STEP -2
> > > > > > PULSOUT 0,B2
> > > > > > PAUSE 15
> > > > > > NEXT B2
> > > > > >'DEBUG "AGAIN"
> > > > > >PAUSE 1000
> > > > > >GOTO AGAIN