I received the book you mentioned yesterday. I guess I should have taken a better look at the code you posted. I was thinking it was for a hexapod walking robot, but it really is for a bipedal robot you are referring to.

The book I mentioned only deals with the haxapod walker so skip it if you are building a bipedal.

Bart