’ / 127 + servo_PulseMax) min servo_PulseMin) max servo_PulseMax [/code]
e.g. using the right stick to control the hex as normal and having a (camera, or sensor) on the top. when direction is given to the hex, the servo will face that direction.
worked fine on atom28 but can this be put into Basic atom pro, ie Phoenix/black widow code as it is or will it need modifying?
Can this same code work on the Atom Pro and I believe the answer is yes. You may need to verify variable sizes… The new powerpod files now can generate code for the Pro and it does appear to generate the Deck_pulse for both 180 and 360 degrees.
The second half is can this be integrated into the phoenix code. I believe that it could, but Xan could probably answer this much better than I could…
LOL, I already answered this in the PM but there is nothing wrong with sharing
Hi Innerbreed,
You’re free to add your part in my code. I didn’t check your code on functionality. Your planning to move a servo to the walking direction. What you can do is use the “walkingâ€
i just thought i would check.
would have compiled the code myself, its just im not set up yet. wife nagging about the mess. i could only blame the child! LOL.
Correct me if I’m wrong but I think you want to increase the time it takes to get the servos from A to B. The servos will travel at a lower speed.
The easiest ways to do this is by increasing the SSCTime. This changes the speed directly. Here is a snippet taken from the main loop. Check for the SSCTime. The NomGaitSpeed is separately defined for each gait. You can increase it there. The speed for body rotation and shift is defined 200 in the snippet shown down here.
[code] IF(HexOn)THEN
;Wait for previous commands to be completed while walking
IF(ABS(TravelLengthX)>TravelDeadZone | ABS(TravelLengthZ)>TravelDeadZone | ABS(TravelRotationY*2)>TravelDeadZone) THEN
pause (PrevSSCTime - CycleTime -50) MIN 1 ; Min 1 ensures that there alway is a value in the pause command
IF(BalanceMode=0)THEN
SSCTime = NomGaitSpeed + (InputTimeDelay*2)
ELSE
SSCTime = NomGaitSpeed + (InputTimeDelay*2) + 100
ENDIF
ELSE
SSCTime = 200 ;NomGaitSpeed
ENDIF
GOSUB ServoDriver
ELSE[/code]
You should play with those numbers to see what the effects are.
will this slow all the servos or just the one. i should have explained it better. say if you was running a "phoenix with a camera mounted on the body. i would want the gaits to remain the same "normal speed but the camera servo to travel at a lower speed.
EDIT:NomGaitSpeed is separately defined for each gait. Got it!