I have a small quadruped with three degree of freedom legs which I have been working on: 3DOF Mini Quadruped.
My original code for it was a simple servo controller on the arduino, and Scala code which would send servo commands over the wire. I did all the Inverse Kinematics and Gait logic in Scala, and got it to walk: 3dof quadruped first gait.
My Gait logic in Scala was somewhat naive; it depended on the legs being in the right position at the beginning (one side extended fore and aft, the other side in toward each other). The logic was simply translate all four feet backward by 1mm along y, and whenever a coxa angle became excessively rearward, stop and perform a little routine where that foot is lifted 10mm in z, then translated forward 60mm along y, and set back down. Naive, but effective.
Now, I have rewritten my IK code in arduino C, and I'm trying to decide how to move forward with the Gait dynamics. I've had a hard time finding good, easy to understand resources about gaits. I do have some knowledge about the difference between dynamically stable gaits (like creep gaits) where the body is a stable tripod at all times and dynamically unstable gaits (walking, trotting), where two legs are off the ground at a time and the body is essentially falling forward into the advancing leg.
I had some thoughts about state machines and trying to calculate whether the body center falls within a triangle made by the remaining feet to decide which foot was safe to lift, but I'm not sure if these are ideas worth exploring.
I know this is kind of an overly general question, but I'm interested to see how other people have attacked this problem, and about all I've been able to find are research papers.