Code to sweep servo with variable gait

Hi all.

I'm in the process of building a simple 3 servo hexapod. I'm using a PS3 controller to control it. At the moment I have it working but the full sketch is to big to fit on the Uno. The blue tooth library takes up a lot of memory.

Anyway. I'm looking to drive it in a different manor which involves having a variable gait distance insted of a variable gait speed.

I've been looking for an example sketch to model off for the past week but have come up with nothing. I think I could probably come up with the walking algorithm but I need help with the code that links the ps3 controller output to a sweep function that varies the end points of the servo sweep. So as the controller joystick is pressed forward the servo sweep back and forth is quite small. As the joystick is pressed further forward the servo sweep gets wider and wider. Does that make sense??

I'm not very good at writing code but I am pretty good at the machanical side of things and I thought this could be done using a 555 timer controlled by the arduino, but I'm sure a well written sketch could do the same thing.

Does anyone know of a sketch I could hack or can someone help me write one??

Any help would be greatly appreciated.