by dshinsel » Wed Mar 29, 2006 7:03 am
by dshinsel
Wed Mar 29, 2006 7:03 am
I received my RoboNova this weekend.
At the same time I ordered it, I ordered two GWS PG-03 Servos.
I have installed them both, one for side tilt and one for front/back tilt.
They work! However, I have not yet tuned the gain, so I don't know how effective the gyros will be for keeping my RoboNova upright!
Also, I'm working on where to put them inside the shell - not much room!
Here is the code needed to get the servos to work:
Just BEFORE MAIN, add this:
' Gyro Setup:
' Gyro 1: Out=P32(AD0), In=P36(AD4) Left/Right
' Gyro 2: Out=P33(AD1), In=P37(AD5) Forward/Back
'================================================
' Setup Gyro for Left/Right AND Forward/Back tilt, using Feet/Ankles only
GYROSET G6A, 0, 2, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6D, 0, 2, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' GYROSET G6B, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' GYROSET G6C, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' NOTE: Not sure I have the direction right yet...
GYRODIR G6A, 0, 1, 0, 0, 0, 0 ' set Gyro to Direction (1=reverse)
GYRODIR G6D, 0, 1, 0, 0, 0, 0 ' set Gyro to Direction
GYROSENSE G6A, 200, 200, 0, 0, 0, 0 ' set Gyro Sensitivity for each servo (255=max)
GYROSENSE G6D, 200, 200, 0, 0, 0, 0 ' set Gyro Sensitivity
I received my RoboNova this weekend.
At the same time I ordered it, I ordered two GWS PG-03 Servos.
I have installed them both, one for side tilt and one for front/back tilt.
They work! However, I have not yet tuned the gain, so I don't know how effective the gyros will be for keeping my RoboNova upright!
Also, I'm working on where to put them inside the shell - not much room!
Here is the code needed to get the servos to work:
Just BEFORE MAIN, add this:
' Gyro Setup:
' Gyro 1: Out=P32(AD0), In=P36(AD4) Left/Right
' Gyro 2: Out=P33(AD1), In=P37(AD5) Forward/Back
'================================================
' Setup Gyro for Left/Right AND Forward/Back tilt, using Feet/Ankles only
GYROSET G6A, 0, 2, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6D, 0, 2, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' GYROSET G6B, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' GYROSET G6C, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
' NOTE: Not sure I have the direction right yet...
GYRODIR G6A, 0, 1, 0, 0, 0, 0 ' set Gyro to Direction (1=reverse)
GYRODIR G6D, 0, 1, 0, 0, 0, 0 ' set Gyro to Direction
GYROSENSE G6A, 200, 200, 0, 0, 0, 0 ' set Gyro Sensitivity for each servo (255=max)
GYROSENSE G6D, 200, 200, 0, 0, 0, 0 ' set Gyro Sensitivity