by H3dude » Sat Jun 10, 2006 12:48 am
by H3dude
Sat Jun 10, 2006 12:48 am
I forgot to mention that the code and gyro position in my last post was only for forward and backward stabilization.
Left-Right Stabilization: If you want to run a gyro for left-right stabilization you would mount the gyro in the same place but rotate it 90 degrees clockwise, and then change the code to reflect the changes:
GYROSET G6A, 1, 0, 0, 0, 0, 1 'gyro 1 affects foot and hip servos
GYROSET G6D, 1, 0, 0, 0, 0, 1 'gyro 1 affects foot and hip servos
GYRODIR G6A,1,0,0,0,0,1 'left or right depends on direction
GYRODIR G6D,1,0,0,0,0,1 'left or right depends on direction
GYROSENSE G6A, 200,0,0, 0, 0, 200 'sensitivity
GYROSENSE G6D, 200,0,0, 0, 0, 200 'sensitivity
THEORETICALLY Using 2 gyros:
Now, if I understand this correctly, if you want to run 2 gyros at the same time, you can mount one on each shoulder. Regarding the numbers simply remember that gyro 1 gets plugged into AD port 0 and 4, gyro 2 gets AD port 1 and 5, etc.. Consequently note that gyro 1 = #1 and gyro 2 = #2 when you are entering values in the GYROSET code...Commented code really helps here:
GYROSET G6A, 2, 1, 1, 0, 0, 2
'gyro2=foot, gyro1=ankle, gyro1=knee, blank, blank, gyro2=hip
GYROSET G6D, 2, 1, 1, 0, 0, 2
'gyro2=foot, gyro1=ankle, gyro1=knee, blank, blank, gyro2=hip
GYRODIR G6A,1,0,1,0,0,1
GYRODIR G6D,1,0,1,0,0,1
GYROSENSE G6A, 200,200,200, 0, 0, 200
GYROSENSE G6D, 200,200,200, 0, 0, 200
As always, someone holler if i screwed this up. I'm getting ready to test it now and post my results.
I forgot to mention that the code and gyro position in my last post was only for forward and backward stabilization.
Left-Right Stabilization: If you want to run a gyro for left-right stabilization you would mount the gyro in the same place but rotate it 90 degrees clockwise, and then change the code to reflect the changes:
GYROSET G6A, 1, 0, 0, 0, 0, 1 'gyro 1 affects foot and hip servos
GYROSET G6D, 1, 0, 0, 0, 0, 1 'gyro 1 affects foot and hip servos
GYRODIR G6A,1,0,0,0,0,1 'left or right depends on direction
GYRODIR G6D,1,0,0,0,0,1 'left or right depends on direction
GYROSENSE G6A, 200,0,0, 0, 0, 200 'sensitivity
GYROSENSE G6D, 200,0,0, 0, 0, 200 'sensitivity
THEORETICALLY Using 2 gyros:
Now, if I understand this correctly, if you want to run 2 gyros at the same time, you can mount one on each shoulder. Regarding the numbers simply remember that gyro 1 gets plugged into AD port 0 and 4, gyro 2 gets AD port 1 and 5, etc.. Consequently note that gyro 1 = #1 and gyro 2 = #2 when you are entering values in the GYROSET code...Commented code really helps here:
GYROSET G6A, 2, 1, 1, 0, 0, 2
'gyro2=foot, gyro1=ankle, gyro1=knee, blank, blank, gyro2=hip
GYROSET G6D, 2, 1, 1, 0, 0, 2
'gyro2=foot, gyro1=ankle, gyro1=knee, blank, blank, gyro2=hip
GYRODIR G6A,1,0,1,0,0,1
GYRODIR G6D,1,0,1,0,0,1
GYROSENSE G6A, 200,200,200, 0, 0, 200
GYROSENSE G6D, 200,200,200, 0, 0, 200
As always, someone holler if i screwed this up. I'm getting ready to test it now and post my results.