by DirtyRoboto » Sun Dec 31, 2006 1:53 am
by DirtyRoboto
Sun Dec 31, 2006 1:53 am
Here is the arm twizzle code from the magic dance routine video.
Enjoy.
Marcus.
' === DirtyRoboto December 30 2006 ===============
' ===
DirtyRoboto@btinternet.com ===============
'== Twizzle arms left/right ============
'== Remote key number 1 triggers this routine ====
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 <> 1 THEN GOTO main
GOSUB twiz_left
GOSUB standard_pose
GOTO MAIN
'====================================
twiz_left:
'arm up and bend
SPEED 13
MOVE G6C,103, 75, 17, 100, 100, 100
MOVE G6B, 93, 100, 168, 100, 100, 100
'-
MOVE G6D,108, 103, 90, 123, 110, 100
MOVE G6A, 95, 84, 114, 114, 87, 100
WAIT
HIGHSPEED SETON
SPEED 8
FOR x = 1 TO 8
MOVE G6B, 68, 101, 189, 100, 100, 100
WAIT
MOVE G6B, 71, 98, 156, 100, 100, 100
WAIT
MOVE G6B,120, 97, 166, 100, 100, 100
WAIT
MOVE G6B, 98, 109, 190, 100, 100, 100
WAIT
NEXT x
HIGHSPEED SETOFF
WAIT
MOVE G6A,102, 78, 130, 110, 98, 100
MOVE G6B,100, 99, 188, 100, 100, 100
MOVE G6C,100, 99, 188, 100, 100, 100
MOVE G6D,102, 72, 134, 113, 98, 100
GOTO twiz_right
'====================================
twiz_right:
'arm up and bend
SPEED 8
MOVE G6B,103, 75, 17, 100, 100, 100
MOVE G6C, 93, 100, 168, 100, 100, 100
'-
MOVE G6A,108, 103, 90, 123, 110, 100
MOVE G6D, 95, 84, 114, 114, 87, 100
WAIT
HIGHSPEED SETON
FOR x = 1 TO 8
MOVE G6C, 68, 101, 189, 100, 100, 100
WAIT
MOVE G6C, 71, 98, 156, 100, 100, 100
WAIT
MOVE G6C,120, 97, 166, 100, 100, 100
WAIT
MOVE G6C, 98, 109, 190, 100, 100, 100
WAIT
NEXT x
HIGHSPEED SETOFF
WAIT
MOVE G6A,102, 78, 130, 110, 98, 100
MOVE G6B,100, 99, 188, 100, 100, 100
MOVE G6C,100, 99, 188, 100, 100, 100
MOVE G6D,102, 72, 134, 113, 98, 100
GOTO standard_pose
'====================================
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
GOTO main
'======================================
Here is the arm twizzle code from the magic dance routine video.
Enjoy.
Marcus.
' === DirtyRoboto December 30 2006 ===============
' ===
DirtyRoboto@btinternet.com ===============
'== Twizzle arms left/right ============
'== Remote key number 1 triggers this routine ====
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 <> 1 THEN GOTO main
GOSUB twiz_left
GOSUB standard_pose
GOTO MAIN
'====================================
twiz_left:
'arm up and bend
SPEED 13
MOVE G6C,103, 75, 17, 100, 100, 100
MOVE G6B, 93, 100, 168, 100, 100, 100
'-
MOVE G6D,108, 103, 90, 123, 110, 100
MOVE G6A, 95, 84, 114, 114, 87, 100
WAIT
HIGHSPEED SETON
SPEED 8
FOR x = 1 TO 8
MOVE G6B, 68, 101, 189, 100, 100, 100
WAIT
MOVE G6B, 71, 98, 156, 100, 100, 100
WAIT
MOVE G6B,120, 97, 166, 100, 100, 100
WAIT
MOVE G6B, 98, 109, 190, 100, 100, 100
WAIT
NEXT x
HIGHSPEED SETOFF
WAIT
MOVE G6A,102, 78, 130, 110, 98, 100
MOVE G6B,100, 99, 188, 100, 100, 100
MOVE G6C,100, 99, 188, 100, 100, 100
MOVE G6D,102, 72, 134, 113, 98, 100
GOTO twiz_right
'====================================
twiz_right:
'arm up and bend
SPEED 8
MOVE G6B,103, 75, 17, 100, 100, 100
MOVE G6C, 93, 100, 168, 100, 100, 100
'-
MOVE G6A,108, 103, 90, 123, 110, 100
MOVE G6D, 95, 84, 114, 114, 87, 100
WAIT
HIGHSPEED SETON
FOR x = 1 TO 8
MOVE G6C, 68, 101, 189, 100, 100, 100
WAIT
MOVE G6C, 71, 98, 156, 100, 100, 100
WAIT
MOVE G6C,120, 97, 166, 100, 100, 100
WAIT
MOVE G6C, 98, 109, 190, 100, 100, 100
WAIT
NEXT x
HIGHSPEED SETOFF
WAIT
MOVE G6A,102, 78, 130, 110, 98, 100
MOVE G6B,100, 99, 188, 100, 100, 100
MOVE G6C,100, 99, 188, 100, 100, 100
MOVE G6D,102, 72, 134, 113, 98, 100
GOTO standard_pose
'====================================
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
GOTO main
'======================================