by DirtyRoboto » Thu Jan 25, 2007 10:53 pm
by DirtyRoboto
Thu Jan 25, 2007 10:53 pm
Here is some code i whizzed up to do a fast side step. It may not work with your bot as mine has rubber soles on its feet for extra grip. Also my zero may not be the same as yours.
Use the L/R cursor keys on the remcon.
please report any findings.
' Ultimate side step
'
Dirtyroboto@btinternet.com
' Jan 2007
'== template ====================================
DIM A AS BYTE
DIM x AS BYTE
PTP SETON
PTP ALLON
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0
SPEED 5
'== motor power on =============================
MOTOR G24
GOSUB standard_pose
'================================================
MAIN:
A = REMOCON(1)
IF A < 13 AND A > 14 THEN GOTO main
IF A = 13 THEN GOSUB side_step_r
IF A = 14 THEN GOSUB side_step_l
GOSUB standard_pose
GOTO MAIN
'========================================
side_step_r:
SPEED 10
'leg out
MOVE G6A, 88, 76, 145, 93, 119, 100
WAIT
'legs together
MOVE G6D, 90, 76, 145, 93, 100, 100
MOVE G6A,100, 76, 145, 93, 100, 100
WAIT
RETURN
'=======================================
side_step_l:
SPEED 8
'leg out
MOVE G6D, 88, 76, 145, 93, 119, 100
'legs together
MOVE G6A, 90, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
WAIT
RETURN
'=======================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
Here is some code i whizzed up to do a fast side step. It may not work with your bot as mine has rubber soles on its feet for extra grip. Also my zero may not be the same as yours.
Use the L/R cursor keys on the remcon.
please report any findings.
' Ultimate side step
'
Dirtyroboto@btinternet.com
' Jan 2007
'== template ====================================
DIM A AS BYTE
DIM x AS BYTE
PTP SETON
PTP ALLON
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0
SPEED 5
'== motor power on =============================
MOTOR G24
GOSUB standard_pose
'================================================
MAIN:
A = REMOCON(1)
IF A < 13 AND A > 14 THEN GOTO main
IF A = 13 THEN GOSUB side_step_r
IF A = 14 THEN GOSUB side_step_l
GOSUB standard_pose
GOTO MAIN
'========================================
side_step_r:
SPEED 10
'leg out
MOVE G6A, 88, 76, 145, 93, 119, 100
WAIT
'legs together
MOVE G6D, 90, 76, 145, 93, 100, 100
MOVE G6A,100, 76, 145, 93, 100, 100
WAIT
RETURN
'=======================================
side_step_l:
SPEED 8
'leg out
MOVE G6D, 88, 76, 145, 93, 119, 100
'legs together
MOVE G6A, 90, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
WAIT
RETURN
'=======================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================