by DirtyRoboto » Tue Nov 07, 2006 6:18 pm
by DirtyRoboto
Tue Nov 07, 2006 6:18 pm
Here is my code for the handshake. when RN1 presents his hand you shake it to make RN1 shake.
Enjoy.
Marcus.
'=====================================================
'hand shake routine. DirtyRobo (Marcus) 2006.
hand_shake:
SPEED 6
DIM s0 AS BYTE
DIM cr AS BYTE
DIM p0 AS BYTE
DIM x0 AS BYTE
cr = 1
rs:
p0 = 1
cr = cr + 1
MUSIC "7cfcfcf"
MOVE G6C,173, , , , ,
DELAY 200
MOTOROFF G6C
fb:
p0 = p0 + 1
s0 = MOTORIN (12)
DELAY 500
x0 = MOTORIN (12)
IF p0 = 20 THEN GOTO rs
IF cr = 7 THEN GOTO out_shake
IF s0 = x0 THEN GOTO fb
MOTOR 12
SPEED 4
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
DELAY 2000
MOVE G6C,101, 30, , , ,
WAIT
out_shake:
MOTOR 12
MOVE G6C,101, 30, , , ,
cr = 1
GOSUB standard_pose
RETURN
'=============================================
Here is my code for the handshake. when RN1 presents his hand you shake it to make RN1 shake.
Enjoy.
Marcus.
'=====================================================
'hand shake routine. DirtyRobo (Marcus) 2006.
hand_shake:
SPEED 6
DIM s0 AS BYTE
DIM cr AS BYTE
DIM p0 AS BYTE
DIM x0 AS BYTE
cr = 1
rs:
p0 = 1
cr = cr + 1
MUSIC "7cfcfcf"
MOVE G6C,173, , , , ,
DELAY 200
MOTOROFF G6C
fb:
p0 = p0 + 1
s0 = MOTORIN (12)
DELAY 500
x0 = MOTORIN (12)
IF p0 = 20 THEN GOTO rs
IF cr = 7 THEN GOTO out_shake
IF s0 = x0 THEN GOTO fb
MOTOR 12
SPEED 4
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
MOVE G6C,188, 30, , , ,
MOVE G6C,165, 30, , , ,
DELAY 2000
MOVE G6C,101, 30, , , ,
WAIT
out_shake:
MOTOR 12
MOVE G6C,101, 30, , , ,
cr = 1
GOSUB standard_pose
RETURN
'=============================================