Boe - bot
I have just recently purchased this bot and have a few questions and I was wondering if anyone can help me....
well here are my questions...
1. I just learned how to navigate with the IR sensors (the high performance navigation activity) and I was wondering if there is any way to smooth out the movements, because now it seems like my bot is very jerky.
2. looking at the BOE where the servos are connected there looks like there is places for 2 more, I was just wondering if this is correct and if it is possible to connect 4?
thanks for taking the time to look at this.
Chris
ps. here is the code that I am using
' {$STAMP BS2}
' {$PBASIC 2.5}
IRDETECTLEFT VAR Bit 'variable declarations
IRDETECTRIGHT VAR Bit
PULSELEFT VAR Word
PULSERIGHT VAR Word
FREQOUT 4, 2000, 3000 'signal program start
DO 'main routine
FREQOUT 8, 1, 38500 'check IR detectors
IRDETECTLEFT = IN9
FREQOUT 2, 1, 38500
IRDETECTRIGHT = IN0
'decide how to navigate
IF (IRDETECTLEFT = 0) THEN
HIGH 10
ELSE
LOW 10
ENDIF
IF (IRDETECTRIGHT = 0) THEN
HIGH 1
ELSE
LOW 1
ENDIF
IF (IRDETECTLEFT = 0) AND (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 650
ELSEIF (IRDETECTLEFT = 0) THEN
PULSELEFT = 650
PULSERIGHT = 650
ELSEIF (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 850
ELSE
PULSELEFT = 650
PULSERIGHT = 850
ENDIF
PULSOUT 13, PULSELEFT 'apply the pulse
PULSOUT 12, PULSERIGHT
PAUSE 30
LOOP 'repeat the routine
well here are my questions...
1. I just learned how to navigate with the IR sensors (the high performance navigation activity) and I was wondering if there is any way to smooth out the movements, because now it seems like my bot is very jerky.
2. looking at the BOE where the servos are connected there looks like there is places for 2 more, I was just wondering if this is correct and if it is possible to connect 4?
thanks for taking the time to look at this.
Chris
ps. here is the code that I am using
' {$STAMP BS2}
' {$PBASIC 2.5}
IRDETECTLEFT VAR Bit 'variable declarations
IRDETECTRIGHT VAR Bit
PULSELEFT VAR Word
PULSERIGHT VAR Word
FREQOUT 4, 2000, 3000 'signal program start
DO 'main routine
FREQOUT 8, 1, 38500 'check IR detectors
IRDETECTLEFT = IN9
FREQOUT 2, 1, 38500
IRDETECTRIGHT = IN0
'decide how to navigate
IF (IRDETECTLEFT = 0) THEN
HIGH 10
ELSE
LOW 10
ENDIF
IF (IRDETECTRIGHT = 0) THEN
HIGH 1
ELSE
LOW 1
ENDIF
IF (IRDETECTLEFT = 0) AND (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 650
ELSEIF (IRDETECTLEFT = 0) THEN
PULSELEFT = 650
PULSERIGHT = 650
ELSEIF (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 850
ELSE
PULSELEFT = 650
PULSERIGHT = 850
ENDIF
PULSOUT 13, PULSELEFT 'apply the pulse
PULSOUT 12, PULSERIGHT
PAUSE 30
LOOP 'repeat the routine
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I was looking at this for quite awhile and wanted someone else to look at it, in case there was something that I was missing.
Thanks,
Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
thanks for all of your help
Elaboretetion commplete.
Yes you can, but keeping them all refreshed with current positioning information on a regular basis (which is required) is another matter entirely, if you wish to do other things as well. Thus, the evolution of servo conrollers, to take that burden off the microcontroller.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->