basic stamp 2
Archiver
Posts: 46,084
i was recently in a robotics class, where i learned some basic stuff
about robotics. I was able to build a robot, using a basic stamp 2
chip. A few weeks later, the chip stopped responidng, and i have no
idea why. If someone knows any solutions to this please e-mail me at
eric.drucker@l...
about robotics. I was able to build a robot, using a basic stamp 2
chip. A few weeks later, the chip stopped responidng, and i have no
idea why. If someone knows any solutions to this please e-mail me at
eric.drucker@l...
Comments
triac in a dimmer circuit. In the following program I can control
the intensity of the light by changing alpha and running the program
again. How do I make a loop that will automatically change alpha from
0 to 6. Any help would be appreciated.
input 10
alpha var byte
cnt var byte
alpha=4
Hold: if IN10 = 0 then Hold
cnt=0
bob:cnt=cnt+1
if cnt >= alpha then ryan
if cnt < alpha then bob
ryan: PulsOut 8,10
pause 7
PulsOut 8,10
goto Hold
Thanks,
Josh
>I am trying to writ a program that will control the firing angle of a
>triac in a dimmer circuit. In the following program I can control
>the intensity of the light by changing alpha and running the program
>again. How do I make a loop that will automatically change alpha from
>0 to 6. Any help would be appreciated.
>
>input 10
>alpha var byte
>cnt var byte
>
>alpha=4 <== Why 4 ??
For alpha = 0 to 6 <== Add
>Hold: if IN10 = 0 then Hold
>cnt=0
>bob:cnt=cnt+1
>if cnt >= alpha then ryan
>if cnt < alpha then bob
>ryan: PulsOut 8,10
>pause 7
>PulsOut 8,10
>goto Hold
Next <== Add
>Thanks,
>Josh
I got my Boe-bot to run with programs that I write. I need some to
tell what is the best way to control the Boe-bot wireless (im able
now to control it through the serial port ) For example if I press
the L key on my keyboard it is going left and R it goes right there
etc. Please help me out. Need this to continue my project.
Much appreciated!!!!!
Dave
has five signals that you can use to do things. Easy to hook up and it
works. You can also get transmitters and receivers that use the serial I/O
methods too, but the keychain model is pretty neat.
Original Message
From: ioa_windsor [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=mwfJTgw0TeVqpVRvpwVGEHLV6Tx4V4xhQLX3bmR-LbbtsZ91c1c_yWNjLxrpGcs6p4HqiORP9iUIl9Ny]ioa_windsor@y...[/url
Sent: Tuesday, February 26, 2002 8:50 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
Hi,
I got my Boe-bot to run with programs that I write. I need some to
tell what is the best way to control the Boe-bot wireless (im able
now to control it through the serial port ) For example if I press
the L key on my keyboard it is going left and R it goes right there
etc. Please help me out. Need this to continue my project.
Much appreciated!!!!!
Dave
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/
I need to know how to send more than one command at once. As of now,
i send a command and I have to wait till it stops (beeps) and then i
can send another command. What i want to do is, lets say i press the
F button which tells the robot to go forward, I want to be able to
make it turn left or right while its still going...
please help...
--- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
wrote:
> Me... I would use the Parallax keychain trnasmitter and receiver.
It
> has five signals that you can use to do things. Easy to hook up
and it
> works. You can also get transmitters and receivers that use the
serial I/O
> methods too, but the keychain model is pretty neat.
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 8:50 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
>
>
> Hi,
>
> I got my Boe-bot to run with programs that I write. I need some to
> tell what is the best way to control the Boe-bot wireless (im able
> now to control it through the serial port ) For example if I press
> the L key on my keyboard it is going left and R it goes right
there
> etc. Please help me out. Need this to continue my project.
>
> Much appreciated!!!!!
> Dave
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
command is. Your in a loop and you use a polling method to see if you
have received a command. It would work off the serial port as well from your
PC too.
Sort of like this:
Assuming the keychain transmitter/receiver setup.
Pin1 forward command
pin2 reverse command
pin3 right
pin4 left
pin5 stop
MainLoop:
check to see if pin1 is low goto forward
check to see if pin2 is low goto reverse
check to see if pin3 is low goto rightturn
check to see if pin4 is low goto leftturn
check to see if pin5 is low goto stoprobot
Goto MainLoop
forward:
make robot go forward
goto mainloop:
reverse:
make robot go backwards
goto mainloop
et cetera
Original Message
From: ioa_windsor [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=AYJuwTLlMLlYqDyf7tgZ7DrXm3PpV3PNWJWe3XN_9Cbrtoi2ajBqw0ULmLbdDkHNbi_ZNCK3io1SlJ4]ioa_windsor@y...[/url
Sent: Tuesday, February 26, 2002 9:45 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
hey,
I need to know how to send more than one command at once. As of now,
i send a command and I have to wait till it stops (beeps) and then i
can send another command. What i want to do is, lets say i press the
F button which tells the robot to go forward, I want to be able to
make it turn left or right while its still going...
please help...
--- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
wrote:
> Me... I would use the Parallax keychain trnasmitter and receiver.
It
> has five signals that you can use to do things. Easy to hook up
and it
> works. You can also get transmitters and receivers that use the
serial I/O
> methods too, but the keychain model is pretty neat.
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 8:50 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
>
>
> Hi,
>
> I got my Boe-bot to run with programs that I write. I need some to
> tell what is the best way to control the Boe-bot wireless (im able
> now to control it through the serial port ) For example if I press
> the L key on my keyboard it is going left and R it goes right
there
> etc. Please help me out. Need this to continue my project.
>
> Much appreciated!!!!!
> Dave
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
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/
to how u are doing it. this is our program that we are using from
our pc thru the serial cable. We need to get this going thru the
serial cable now, and later on in the future we'll look at the
wireless communication .
Where do we go from here?
'{$STAMP BS2}
' if you are not using a BS2 you will have to change
' the baud rate (which is 2400) values to work on the
' version of stamp that you have
output 2 ' + side of buzzer connected
to pin 2
freqout 2, 1500, 4000 'tone for buzzer (check
battery)
low 12 'set pin 12 for output
(servo 1)
low 13 'set pin 13 for output
(servo 2)
pulse_count var word 'declare a variable
control var byte ' (same)
'****************************
again:
'serin 16,16780,[noparse][[/noparse]WAIT ("HELLO")]
'serout 16,16780,[noparse][[/noparse]13,10,"GOODBYE",13,10]
serin 16,16780,[noparse][[/noparse]control]
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
goto again
LEFT: 'quick left turn
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 500
pause 20
next
goto again
RIGHT: 'quick right turn
for pulse_count = 1 to 70
pulsout 12, 1000
pulsout 13, 1000
pause 100
next
goto again
FORWARD: 'do a step forward at max
speed
for pulse_count = 1 to 75
pulsout 12, 1000
pulsout 13, 500
pause 1
next
goto again
BACKWARD: 'do a step backward at max
speed
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 1000
pause 1
next
goto again
UTURN: 'do a complete U turn
for pulse_count = 0 to 140
pulsout 12, 1000
pulsout 13, 1000
pause 20
next
goto again
--- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
wrote:
>
> You would need to do something like a Loop and check to see what
the
> command is. Your in a loop and you use a polling method to see if
you
> have received a command. It would work off the serial port as well
from your
> PC too.
> Sort of like this:
>
> Assuming the keychain transmitter/receiver setup.
> Pin1 forward command
> pin2 reverse command
> pin3 right
> pin4 left
> pin5 stop
>
> MainLoop:
> check to see if pin1 is low goto forward
> check to see if pin2 is low goto reverse
> check to see if pin3 is low goto rightturn
> check to see if pin4 is low goto leftturn
> check to see if pin5 is low goto stoprobot
> Goto MainLoop
>
> forward:
> make robot go forward
> goto mainloop:
>
> reverse:
> make robot go backwards
> goto mainloop
>
> et cetera
>
>
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 9:45 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
>
>
> hey,
> I need to know how to send more than one command at once. As of
now,
> i send a command and I have to wait till it stops (beeps) and then
i
> can send another command. What i want to do is, lets say i press
the
> F button which tells the robot to go forward, I want to be able to
> make it turn left or right while its still going...
> please help...
>
> --- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
> wrote:
> > Me... I would use the Parallax keychain trnasmitter and receiver.
> It
> > has five signals that you can use to do things. Easy to hook up
> and it
> > works. You can also get transmitters and receivers that use the
> serial I/O
> > methods too, but the keychain model is pretty neat.
> >
> >
Original Message
> > From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> > Sent: Tuesday, February 26, 2002 8:50 PM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
> >
> >
> > Hi,
> >
> > I got my Boe-bot to run with programs that I write. I need some
to
> > tell what is the best way to control the Boe-bot wireless (im
able
> > now to control it through the serial port ) For example if I
press
> > the L key on my keyboard it is going left and R it goes right
> there
> > etc. Please help me out. Need this to continue my project.
> >
> > Much appreciated!!!!!
> > Dave
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > 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/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
stop
until it receives a character byte from your PC.
serin 16,16780,control
So when the program encounters this line it will wait for a byte to come
from your
PC.
Have you tried sending a command multiple times? like so
FFFFFFFFFF robot goes forward
then RRRRRRRRRRR unitl robot turns right
then FFFFFFFFFF...until robot goes forward again.
When the robot is down in your motor control routiones, it will ignore
everything
from the serial port.
Another thing is unless you send the servo commands (the pulsout commands)
about 20 times per second, the servos will stop.
So you need a command like Forward within your loop
again:
serin 16,16780,[noparse][[/noparse]control] 'don't know about this, the program will stop
' and wait for a byte, you'll need to keep
'typing a letter on the keyboard for this get
'through the serial command
'When the program is executing these IF statements it'll ignore the
keyboard
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
forward 'need this to keep the servos from stoping
goto again
Original Message
From: ioa_windsor [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=4QUtGPlOopcnZx9-3BmLYmSMgWH_k0mz0wJU9_QWTsfdo_b9XC3cdL_YNSOjc_8bmS2UBjUPY4NaN2LjAs9v]ioa_windsor@y...[/url
Sent: Tuesday, February 26, 2002 10:22 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
hi, we are using somewhat of a different program. We kinda got lost
to how u are doing it. this is our program that we are using from
our pc thru the serial cable. We need to get this going thru the
serial cable now, and later on in the future we'll look at the
wireless communication .
Where do we go from here?
'{$STAMP BS2}
' if you are not using a BS2 you will have to change
' the baud rate (which is 2400) values to work on the
' version of stamp that you have
output 2 ' + side of buzzer connected
to pin 2
freqout 2, 1500, 4000 'tone for buzzer (check
battery)
low 12 'set pin 12 for output
(servo 1)
low 13 'set pin 13 for output
(servo 2)
pulse_count var word 'declare a variable
control var byte ' (same)
'****************************
again:
'serin 16,16780,[noparse][[/noparse]WAIT ("HELLO")]
'serout 16,16780,[noparse][[/noparse]13,10,"GOODBYE",13,10]
serin 16,16780,[noparse][[/noparse]control]
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
goto again
LEFT: 'quick left turn
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 500
pause 20
next
goto again
RIGHT: 'quick right turn
for pulse_count = 1 to 70
pulsout 12, 1000
pulsout 13, 1000
pause 100
next
goto again
FORWARD: 'do a step forward at max
speed
for pulse_count = 1 to 75
pulsout 12, 1000
pulsout 13, 500
pause 1
next
goto again
BACKWARD: 'do a step backward at max
speed
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 1000
pause 1
next
goto again
UTURN: 'do a complete U turn
for pulse_count = 0 to 140
pulsout 12, 1000
pulsout 13, 1000
pause 20
next
goto again
--- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
wrote:
>
> You would need to do something like a Loop and check to see what
the
> command is. Your in a loop and you use a polling method to see if
you
> have received a command. It would work off the serial port as well
from your
> PC too.
> Sort of like this:
>
> Assuming the keychain transmitter/receiver setup.
> Pin1 forward command
> pin2 reverse command
> pin3 right
> pin4 left
> pin5 stop
>
> MainLoop:
> check to see if pin1 is low goto forward
> check to see if pin2 is low goto reverse
> check to see if pin3 is low goto rightturn
> check to see if pin4 is low goto leftturn
> check to see if pin5 is low goto stoprobot
> Goto MainLoop
>
> forward:
> make robot go forward
> goto mainloop:
>
> reverse:
> make robot go backwards
> goto mainloop
>
> et cetera
>
>
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 9:45 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
>
>
> hey,
> I need to know how to send more than one command at once. As of
now,
> i send a command and I have to wait till it stops (beeps) and then
i
> can send another command. What i want to do is, lets say i press
the
> F button which tells the robot to go forward, I want to be able to
> make it turn left or right while its still going...
> please help...
>
> --- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
> wrote:
> > Me... I would use the Parallax keychain trnasmitter and receiver.
> It
> > has five signals that you can use to do things. Easy to hook up
> and it
> > works. You can also get transmitters and receivers that use the
> serial I/O
> > methods too, but the keychain model is pretty neat.
> >
> >
Original Message
> > From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> > Sent: Tuesday, February 26, 2002 8:50 PM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
> >
> >
> > Hi,
> >
> > I got my Boe-bot to run with programs that I write. I need some
to
> > tell what is the best way to control the Boe-bot wireless (im
able
> > now to control it through the serial port ) For example if I
press
> > the L key on my keyboard it is going left and R it goes right
> there
> > etc. Please help me out. Need this to continue my project.
> >
> > Much appreciated!!!!!
> > Dave
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > 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/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
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/
>stop
>until it receives a character byte from your PC.
>serin 16,16780,control
>So when the program encounters this line it will wait for a byte to come
>from your
>PC.
You can put an extra variable in that line to tell serin that if it doesn't
receive anything within x time period, to go to another point in the
program.
Example:
SERIN 16, 396, 200, Checkbuttons, [noparse][[/noparse]DatafromPC]
The above command says:
Receive serial data on port 16 at 2400 baud, 8, N, 1 (396).
If no data after 200ms, then branch to the routine called "Checkbuttons".
If data is received, put it in the variable "DatafromPC".
--
http://www.lennard.net.nz/
Ben Lennard, NCEE, Dip EE
Web Hosting and Electronics R&D
Club Coordinator, Victoria University of Wellington Hockey Club
Hm: +64 4 972 7567
Mb: +64 21 536 627
87 Spencer Street
Crofton Downs
Wellington
New Zealand
"To the optimist, the glass is half full. To the pessimist, the glass is
half empty. To the engineer, the glass is twice as big as it needs to be."
No animals were harmed in the transmission of this email, although the
Dog next door is living on borrowed time, let me tell you! Those of you
with an overwhelming fear of the unknown will be gratified to learn that
there is no hidden message revealed by reading this warning backwards.
From: "Earl Bollinger" <earlwbollinger@a...>
To: <basicstamps@yahoogroups.com>
Subject: RE: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
Date: Thu, 28 Feb 2002 1:12 AM
Using the serial port for this will be a problem, because the program will
stop
until it receives a character byte from your PC.
serin 16,16780,control
So when the program encounters this line it will wait for a byte to come
from your
PC.
Have you tried sending a command multiple times? like so
FFFFFFFFFF robot goes forward
then RRRRRRRRRRR unitl robot turns right
then FFFFFFFFFF...until robot goes forward again.
When the robot is down in your motor control routiones, it will ignore
everything
from the serial port.
Another thing is unless you send the servo commands (the pulsout commands)
about 20 times per second, the servos will stop.
So you need a command like Forward within your loop
again:
serin 16,16780,[noparse][[/noparse]control] 'don't know about this, the program will stop
' and wait for a byte, you'll need to keep
'typing a letter on the keyboard for this get
'through the serial command
'When the program is executing these IF statements it'll ignore the
keyboard
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
forward 'need this to keep the servos from stoping
goto again
Original Message
From: ioa_windsor [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WiUfawhVB_aiDgCuCwKzjGYCGse8QQExTwtAw9mzK8k5QgHr4JnPOLHSl_Xu5SRRK5HzYq5d5f_S9A]ioa_windsor@y...[/url
Sent: Tuesday, February 26, 2002 10:22 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
hi, we are using somewhat of a different program. We kinda got lost
to how u are doing it. this is our program that we are using from
our pc thru the serial cable. We need to get this going thru the
serial cable now, and later on in the future we'll look at the
wireless communication .
Where do we go from here?
'{$STAMP BS2}
' if you are not using a BS2 you will have to change
' the baud rate (which is 2400) values to work on the
' version of stamp that you have
output 2 ' + side of buzzer connected
to pin 2
freqout 2, 1500, 4000 'tone for buzzer (check
battery)
low 12 'set pin 12 for output
(servo 1)
low 13 'set pin 13 for output
(servo 2)
pulse_count var word 'declare a variable
control var byte ' (same)
'****************************
again:
'serin 16,16780,[noparse][[/noparse]WAIT ("HELLO")]
'serout 16,16780,[noparse][[/noparse]13,10,"GOODBYE",13,10]
serin 16,16780,[noparse][[/noparse]control]
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
goto again
LEFT: 'quick left turn
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 500
pause 20
next
goto again
RIGHT: 'quick right turn
for pulse_count = 1 to 70
pulsout 12, 1000
pulsout 13, 1000
pause 100
next
goto again
FORWARD: 'do a step forward at max
speed
for pulse_count = 1 to 75
pulsout 12, 1000
pulsout 13, 500
pause 1
next
goto again
BACKWARD: 'do a step backward at max
speed
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 1000
pause 1
next
goto again
UTURN: 'do a complete U turn
for pulse_count = 0 to 140
pulsout 12, 1000
pulsout 13, 1000
pause 20
next
goto again
--- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
wrote:
>
> You would need to do something like a Loop and check to see what
the
> command is. Your in a loop and you use a polling method to see if
you
> have received a command. It would work off the serial port as well
from your
> PC too.
> Sort of like this:
>
> Assuming the keychain transmitter/receiver setup.
> Pin1 forward command
> pin2 reverse command
> pin3 right
> pin4 left
> pin5 stop
>
> MainLoop:
> check to see if pin1 is low goto forward
> check to see if pin2 is low goto reverse
> check to see if pin3 is low goto rightturn
> check to see if pin4 is low goto leftturn
> check to see if pin5 is low goto stoprobot
> Goto MainLoop
>
> forward:
> make robot go forward
> goto mainloop:
>
> reverse:
> make robot go backwards
> goto mainloop
>
> et cetera
>
>
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 9:45 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
>
>
> hey,
> I need to know how to send more than one command at once. As of
now,
> i send a command and I have to wait till it stops (beeps) and then
i
> can send another command. What i want to do is, lets say i press
the
> F button which tells the robot to go forward, I want to be able to
> make it turn left or right while its still going...
> please help...
>
> --- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
> wrote:
> > Me... I would use the Parallax keychain trnasmitter and receiver.
> It
> > has five signals that you can use to do things. Easy to hook up
> and it
> > works. You can also get transmitters and receivers that use the
> serial I/O
> > methods too, but the keychain model is pretty neat.
> >
> >
Original Message
> > From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> > Sent: Tuesday, February 26, 2002 8:50 PM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
> >
> >
> > Hi,
> >
> > I got my Boe-bot to run with programs that I write. I need some
to
> > tell what is the best way to control the Boe-bot wireless (im
able
> > now to control it through the serial port ) For example if I
press
> > the L key on my keyboard it is going left and R it goes right
> there
> > etc. Please help me out. Need this to continue my project.
> >
> > Much appreciated!!!!!
> > Dave
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > 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/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
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/
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/
bit.
so far this is what my program looks like:
its still pretty much doing the same thing. can you help with
reprogramming it, so that we can interupt it while its performing
one of the functions such as forward, to make it turn left or right.
Please help, as we are getting close to the deadline..if certain
hardware or software is needed etc.. thnx for your time
'{$STAMP BS2}
' if you are not using a BS2 you will have to change
' the baud rate (which is 2400) values to work on the
' version of stamp that you have
output 2
output 3
output 7
output 1
' + side of buzzer connected to pin 2
'freqout 2, 1500, 4000 'tone for buzzer (check
battery)
low 12 'set pin 12 for output
(servo 1)
low 13 'set pin 13 for output
(servo 2)
pulse_count var word 'declare a variable
control var byte ' (same)
DatafromPC var byte
parameter var byte ' (same)
curvature var word ' (same)
dist var byte 'DIRR
sensors var nib
dout con 5 'output to the DIRRS.
din con 6 'input from the DIRRS.
'****************************
high dout 'raise output pin DIRR.
input din 'set to in
again:
'serin 16,16780,[noparse][[/noparse]WAIT ("HELLO")]
'serout 16,16780,[noparse][[/noparse]13,10,"GOODBYE",13,10]
serin 16,16780,[noparse][[/noparse]control]
if control = "L" then left
if control = "R" then right
if control = "F" then forward
if control = "B" then backward
if control = "U" then uturn
if control = "A" then alarm
if control = "Y" then rampup 'accelerates from zero speed
if control = "Z" then rampdown 'decelerates to zero speed
if control = "X" then assignment 'this command gets a
parameter
if control = "C" then curveL
if control = "E" then curveR
if control = "D" then dirr
if control = "H" then main
goto again
SERIN 16, 396, 1000, Checkbuttons, [noparse][[/noparse]DatafromPC]
Checkbuttons:
if DatafromPC = "L" then left
if DatafromPC = "R" then right
if DatafromPC = "F" then forward
if DatafromPC = "B" then backward
goto Checkbuttons
'freqout 2, 2000, 3000
'low 12
'low 13
'
main routine
main:
freqout 7, 1, 38500
sensors.bit0 = in8
freqout 1, 1, 38500
sensors.bit1 = in0
pause 40
branch sensors, [noparse][[/noparse]backward1, right_turn,left_turn, forward1]
forward1: pulsout 13,1000: pulsout 12, 500: goto main
left_turn: pulsout 13,500: pulsout 12, 500: goto main
right_turn: pulsout 13,1000: pulsout 12,1000: goto main
backward1: pulsout 13,500: pulsout 12, 1000: goto main
LEFT: 'quick left turn
for pulse_count = 1 to 75
pulsout 12, 500
pulsout 13, 500
pause 20
next
goto again
--- In basicstamps@y..., "Ben Lennard" <postmaster@s...> wrote:
> >Using the serial port for this will be a problem, because the
program will
> >stop
> >until it receives a character byte from your PC.
> >serin 16,16780,control
> >So when the program encounters this line it will wait for a byte
to come
> >from your
> >PC.
>
> You can put an extra variable in that line to tell serin that if
it doesn't
> receive anything within x time period, to go to another point in
the
> program.
>
> Example:
>
> SERIN 16, 396, 200, Checkbuttons, [noparse][[/noparse]DatafromPC]
>
> The above command says:
>
> Receive serial data on port 16 at 2400 baud, 8, N, 1 (396).
> If no data after 200ms, then branch to the routine
called "Checkbuttons".
> If data is received, put it in the variable "DatafromPC".
>
>
> --
> http://www.lennard.net.nz/
> Ben Lennard, NCEE, Dip EE
>
> Web Hosting and Electronics R&D
> Club Coordinator, Victoria University of Wellington Hockey Club
>
> Hm: +64 4 972 7567
> Mb: +64 21 536 627
> 87 Spencer Street
> Crofton Downs
> Wellington
> New Zealand
>
> "To the optimist, the glass is half full. To the pessimist, the
glass is
> half empty. To the engineer, the glass is twice as big as it
needs to be."
>
> No animals were harmed in the transmission of this email, although
the
> Dog next door is living on borrowed time, let me tell you! Those
of you
> with an overwhelming fear of the unknown will be gratified to
learn that
> there is no hidden message revealed by reading this warning
backwards.
>
>
>
>
>
> From: "Earl Bollinger" <earlwbollinger@a...>
> To: <basicstamps@y...>
> Subject: RE: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
> Date: Thu, 28 Feb 2002 1:12 AM
>
>
> Using the serial port for this will be a problem, because the
program will
> stop
> until it receives a character byte from your PC.
> serin 16,16780,control
> So when the program encounters this line it will wait for a byte
to come
> from your
> PC.
> Have you tried sending a command multiple times? like so
> FFFFFFFFFF robot goes forward
> then RRRRRRRRRRR unitl robot turns right
> then FFFFFFFFFF...until robot goes forward again.
> When the robot is down in your motor control routiones, it will
ignore
> everything
> from the serial port.
>
> Another thing is unless you send the servo commands (the pulsout
commands)
> about 20 times per second, the servos will stop.
> So you need a command like Forward within your loop
> again:
> serin 16,16780,[noparse][[/noparse]control] 'don't know about this, the program
will stop
> ' and wait for a byte, you'll need to keep
> 'typing a letter on the keyboard for this get
> 'through the serial command
> 'When the program is executing these IF statements it'll ignore
the
> keyboard
> if control = "L" then left
> if control = "R" then right
> if control = "F" then forward
> if control = "B" then backward
> if control = "U" then uturn
> forward 'need this to keep the servos from stoping
> goto again
>
>
>
Original Message
> From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> Sent: Tuesday, February 26, 2002 10:22 PM
> To: basicstamps@y...
> Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
>
>
> hi, we are using somewhat of a different program. We kinda got lost
> to how u are doing it. this is our program that we are using from
> our pc thru the serial cable. We need to get this going thru the
> serial cable now, and later on in the future we'll look at the
> wireless communication .
> Where do we go from here?
> '{$STAMP BS2}
> ' if you are not using a BS2 you will have to change
> ' the baud rate (which is 2400) values to work on the
> ' version of stamp that you have
>
> output 2 ' + side of buzzer connected
> to pin 2
> freqout 2, 1500, 4000 'tone for buzzer (check
> battery)
> low 12 'set pin 12 for output
> (servo 1)
> low 13 'set pin 13 for output
> (servo 2)
> pulse_count var word 'declare a variable
> control var byte ' (same)
>
>
>
> '****************************
>
>
> again:
>
> 'serin 16,16780,[noparse][[/noparse]WAIT ("HELLO")]
> 'serout 16,16780,[noparse][[/noparse]13,10,"GOODBYE",13,10]
>
> serin 16,16780,[noparse][[/noparse]control]
>
> if control = "L" then left
> if control = "R" then right
> if control = "F" then forward
> if control = "B" then backward
> if control = "U" then uturn
>
>
> goto again
>
> LEFT: 'quick left turn
> for pulse_count = 1 to 75
> pulsout 12, 500
> pulsout 13, 500
> pause 20
> next
> goto again
>
> RIGHT: 'quick right turn
> for pulse_count = 1 to 70
> pulsout 12, 1000
> pulsout 13, 1000
> pause 100
> next
> goto again
>
>
> FORWARD: 'do a step forward at max
> speed
> for pulse_count = 1 to 75
> pulsout 12, 1000
> pulsout 13, 500
> pause 1
> next
> goto again
>
>
> BACKWARD: 'do a step backward at max
> speed
> for pulse_count = 1 to 75
> pulsout 12, 500
> pulsout 13, 1000
> pause 1
> next
> goto again
>
>
> UTURN: 'do a complete U turn
> for pulse_count = 0 to 140
> pulsout 12, 1000
> pulsout 13, 1000
> pause 20
> next
> goto again
>
>
>
>
>
>
>
>
> --- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
> wrote:
> >
> > You would need to do something like a Loop and check to see what
> the
> > command is. Your in a loop and you use a polling method to see if
> you
> > have received a command. It would work off the serial port as
well
> from your
> > PC too.
> > Sort of like this:
> >
> > Assuming the keychain transmitter/receiver setup.
> > Pin1 forward command
> > pin2 reverse command
> > pin3 right
> > pin4 left
> > pin5 stop
> >
> > MainLoop:
> > check to see if pin1 is low goto forward
> > check to see if pin2 is low goto reverse
> > check to see if pin3 is low goto rightturn
> > check to see if pin4 is low goto leftturn
> > check to see if pin5 is low goto stoprobot
> > Goto MainLoop
> >
> > forward:
> > make robot go forward
> > goto mainloop:
> >
> > reverse:
> > make robot go backwards
> > goto mainloop
> >
> > et cetera
> >
> >
> >
> >
Original Message
> > From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> > Sent: Tuesday, February 26, 2002 9:45 PM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] Re: Basic stamp 2
> >
> >
> > hey,
> > I need to know how to send more than one command at once. As of
> now,
> > i send a command and I have to wait till it stops (beeps) and
then
> i
> > can send another command. What i want to do is, lets say i press
> the
> > F button which tells the robot to go forward, I want to be able
to
> > make it turn left or right while its still going...
> > please help...
> >
> > --- In basicstamps@y..., "Earl Bollinger" <earlwbollinger@a...>
> > wrote:
> > > Me... I would use the Parallax keychain trnasmitter and
receiver.
> > It
> > > has five signals that you can use to do things. Easy to hook up
> > and it
> > > works. You can also get transmitters and receivers that use the
> > serial I/O
> > > methods too, but the keychain model is pretty neat.
> > >
> > >
Original Message
> > > From: ioa_windsor [noparse][[/noparse]mailto:ioa_windsor@y...]
> > > Sent: Tuesday, February 26, 2002 8:50 PM
> > > To: basicstamps@y...
> > > Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
> > >
> > >
> > > Hi,
> > >
> > > I got my Boe-bot to run with programs that I write. I need some
> to
> > > tell what is the best way to control the Boe-bot wireless (im
> able
> > > now to control it through the serial port ) For example if I
> press
> > > the L key on my keyboard it is going left and R it goes right
> > there
> > > etc. Please help me out. Need this to continue my project.
> > >
> > > Much appreciated!!!!!
> > > Dave
> > >
> > >
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@y...
> > > 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/
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > 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/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@y...
> 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/
frequeny as like a frequency counter. the counter only has to read
upto 20 mhz.. i have the max7219 with 3 displays tied to it. i only
need to have the display read 3 digits after the decmal point. i
dont need any specail input circuit since it will be reading a 5
volt square way.
thank you neil
COUNT pin,period,variable
Count is an instruction which counds the pulses per time period on a
given pin and stores it into the the variable.
Easy, huh?
-Martin Hebel
--- In basicstamps@y..., "excelneil" <excelneil@m...> wrote:
> i am wondering if there is a way of making the basic stamp 2 read
> frequeny as like a frequency counter. the counter only has to read
> upto 20 mhz.. i have the max7219 with 3 displays tied to it. i
only
> need to have the display read 3 digits after the decmal point. i
> dont need any specail input circuit since it will be reading a 5
> volt square way.
>
> thank you neil
higher for the 'sx and 'p). In order to get up to 20mhz, you will
need a divider circuit, something like a /200 or /256. That could be
something like a 74HC4060.
-- Tracy
>Sure is:
>COUNT pin,period,variable
>
>Count is an instruction which counds the pulses per time period on a
>given pin and stores it into the the variable.
>
>Easy, huh?
>-Martin Hebel
>
>
>--- In basicstamps@y..., "excelneil" <excelneil@m...> wrote:
>> i am wondering if there is a way of making the basic stamp 2 read
>> frequeny as like a frequency counter. the counter only has to read
>> upto 20 mhz.. i have the max7219 with 3 displays tied to it. i
>only
>> need to have the display read 3 digits after the decmal point. i
>> dont need any specail input circuit since it will be reading a 5
>> volt square way.
>>
>
> > thank you neil
Is et posible to fix 2 bs2 together , and how you program the I/O ,
I need 20 I/O for mine project and I will to dit with 2 basic stamps
2 , and than I have more memory also , I hoop
Kind regards
Erwin
used dual BS2's in many applications. like i said it all depends on the
app. best regards
-Garyd
Kyocera-Wireless
At 06:19 PM 1/8/2004 +0000, you wrote:
>Hello ,
>Is et posible to fix 2 bs2 together , and how you program the I/O ,
>I need 20 I/O for mine project and I will to dit with 2 basic stamps
>2 , and than I have more memory also , I hoop
>
>Kind regards
>Erwin
>
>
>
>
>
>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.
>
>
>Yahoo! Groups Links
>
>To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
>To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
article may help:
http://www.parallax.com/dl/docs/cols/nv/vol3/col/81.pdf
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: on4aij [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ymYXQwuhosGPrYAM98wZasH08fROXPXoHI20vp2mRNm_iwxBkgcEbWUPziWWpq5svBuPZhGc-zXQ]on4aij@y...[/url
Sent: Thursday, January 08, 2004 12:20 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Basic stamp 2
Hello ,
Is et posible to fix 2 bs2 together , and how you program the I/O ,
I need 20 I/O for mine project and I will to dit with 2 basic stamps
2 , and than I have more memory also , I hoop
Kind regards
Erwin
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.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....