Just wondering about controls...
msg009
Posts: 2
Is there any way to control the Boe Bot without the Bluetooth connector? Like controlling it with the arrow keys?
Here is my movement program (without ramping/ just basic movements):
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
GOSUB forward
GOSUB backward
GOSUB left
GOSUB right
END
forward:
FOR counter = 1 TO 100
PULSOUT 12, 850
PULSOUT 13, 650
PULSOUT 14, 850
PULSOUT 15, 650
PAUSE 20
NEXT
backward:
FOR counter = 1 TO 100
PULSOUT 12, 650
PULSOUT 13, 850
PULSOUT 14, 650
PULSOUT 15, 850
PAUSE 20
NEXT
left:
FOR counter = 1 TO 50
PULSOUT 12, 750
PULSOUT 13, 650
PULSOUT 14, 750
PULSOUT 15, 650
PAUSE 20
NEXT
right:
FOR counter = 1 TO 50
PULSOUT 12, 850
PULSOUT 13, 750
PULSOUT 14, 850
PULSOUT 15, 750
PAUSE 20
NEXT
My bot has four wheels by the way.
Here is my movement program (without ramping/ just basic movements):
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
GOSUB forward
GOSUB backward
GOSUB left
GOSUB right
END
forward:
FOR counter = 1 TO 100
PULSOUT 12, 850
PULSOUT 13, 650
PULSOUT 14, 850
PULSOUT 15, 650
PAUSE 20
NEXT
backward:
FOR counter = 1 TO 100
PULSOUT 12, 650
PULSOUT 13, 850
PULSOUT 14, 650
PULSOUT 15, 850
PAUSE 20
NEXT
left:
FOR counter = 1 TO 50
PULSOUT 12, 750
PULSOUT 13, 650
PULSOUT 14, 750
PULSOUT 15, 650
PAUSE 20
NEXT
right:
FOR counter = 1 TO 50
PULSOUT 12, 850
PULSOUT 13, 750
PULSOUT 14, 850
PULSOUT 15, 750
PAUSE 20
NEXT
My bot has four wheels by the way.
Comments
Do you want to use the programming connection between the BoeBot and your PC? It's not at all clear.
In the example you posted, you call "forward", "backward", "left", and "right" as subroutines, but you don't have a RETURN statement at the end of each. You'll need that.