' zero position
ZERO G6A, 99, 102, 97, 101, 102
ZERO G6B,100, 103, 99, 117
ZERO G6C, 99, 100, 98, , , 92
ZERO G6D,100, 104, 103, 101, 104, 115
GOTO AUTO
FILL 255,10000
PTP SETON
PTP ALLON
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,0,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0
DELAY 5000
SPEED 5
DIM mtr AS BYTE
'switch motors 0 to 14 on
FOR mtr = 0 TO 14
MOTOR mtr
NEXT mtr
'switch motors 17 to 23 on
FOR mtr = 17 TO 23
MOTOR mtr
NEXT mtr
' switch 15 and 16 off
MOTOROFF 15
MOTOROFF 16
.........
I tried to issue a MOTOROFF 15 and MOTOROFF 16 commands to free up the ports to use for I2c,However the MOTOROFF [servo number] command did not seem work after a MOTOR G24, so I turned on the required servos with the MOTOR [servo number] command, in place of MOTOR G24:
....
SPEED 5
MOTOR 0
MOTOR 1
MOTOR 2
MOTOR 3
MOTOR 4
MOTOR 6
MOTOR 7
MOTOR 8
'MOTOR 9 'Left hand
'MOTOR 11 'Head
MOTOR 12
MOTOR 13
MOTOR 14
'MOTOR 17 'Right hand
MOTOR 18
MOTOR 19
MOTOR 20
MOTOR 21
MOTOR 22
.....
' zero position
ZERO G6A, 99, 102, 97, 101, 102
ZERO G6B,100, 103, 99, 117
ZERO G6C, 99, 100, 98, , , 92
ZERO G6D,100, 104, 103, 101, 104, 115
GOTO AUTO
FILL 255,10000
PTP SETON
PTP ALLON
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,0,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0
DELAY 5000
SPEED 5
DIM mtr AS BYTE
MOTOR 0
MOTOR 1
MOTOR 2
MOTOR 3
MOTOR 4
MOTOR 5
MOTOR 6
MOTOR 7
MOTOR 8
MOTOR 9
MOTOR 10
MOTOR 11
MOTOR 12
MOTOR 13
MOTOR 14
MOTOR 17
MOTOR 18
MOTOR 19
MOTOR 20
MOTOR 21
MOTOR 22
MOTOR 23
GOSUB STANDARD_POSE