Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Arm Twizzle (from magic dance routine)

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
3 postsPage 1 of 1
3 postsPage 1 of 1

Arm Twizzle (from magic dance routine)

Post by DirtyRoboto » Sun Dec 31, 2006 1:53 am

Post 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
'======================================
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by Humanoido » Sun Dec 31, 2006 9:12 am

Post by Humanoido
Sun Dec 31, 2006 9:12 am

Thank you very much for posting the Arm Twizzle code from the Magic Dance Routine. After you finished programming the entire Magic Dance Routine, was there any memory left in the controller for more moves? What is the limit of the controller?

Humanoido
Thank you very much for posting the Arm Twizzle code from the Magic Dance Routine. After you finished programming the entire Magic Dance Routine, was there any memory left in the controller for more moves? What is the limit of the controller?

Humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by DirtyRoboto » Sun Dec 31, 2006 12:39 pm

Post by DirtyRoboto
Sun Dec 31, 2006 12:39 pm

The dance routine code was smaller then the Overall_Template code.
I haven't really looked at the space left in the controller but I guess you could fit plenty of well written code onto it. Just not the sort of AI type code we all want to use.

Marcus.
The dance routine code was smaller then the Overall_Template code.
I haven't really looked at the space left in the controller but I guess you could fit plenty of well written code onto it. Just not the sort of AI type code we all want to use.

Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London


3 postsPage 1 of 1
3 postsPage 1 of 1