My main goal was to make the robot move forward, in addition to bobbing up and down. I ended up using a four-bar linkage to try to push the robot forward, while also having it move up and down. The bars are at an angle, pushing the body both forwards and upwards, and then the body falls back down as an arm moves back. Overall it kind of works, it moves pretty slow and not super straight. I ended up having to add a lot of weight to the back of the robot to get the feet to stop slipping on the table. I also added rubber bands on the feet to increase the friction. It also is sort of able to turn left and right by only pushing with one foot, but it doesn’t work that well.

#include <Servo.h&gt;

Servo myservo;

void setup() 
{ 
  myservo.attach(3);
} 

void moveStraight(){
  for(int i = 0; i < 10; i++){
      myservo.write(130);
    delay(600);
    myservo.write(185);
    delay(600);
  }
}


void loop() {
  moveStraight();
  }