biped

code to make a 6dof biped walk. im not a programmer, but wanted thi guy to take a couple of steps to show my parents, but cant find a sample code to upload. can anyone help? thanks

wow thanks for all the help community of friends, i'm being sarcastic, because the first & only thing i reached for help/advice for from a supposed community of people dedicated to help & inspire new comers to the field/ comm, not one person viewed r responded! stop putting out there that u want to help newcomers who dont know much about robotics but truly want to if u dont help!

Whoa! Calm down :slight_smile:
Are you sure that there is NO example code?
I saw a biped that took a step with one leg while shifting the center of gravity over the other leg. It looked weird, but it certainly worked!
Just find some code, read through it and try to understand it. Youtube helps too.

Dude.

You are misunderstanding how this place works. I don't think anyone puts anything like what you describe "out there." This is your wishful thinking.

If you want help, show us what you have done so far. First thing you should do is use a search engine to find projects similar to what you want. Like this: LMGTFY - Let Me Google That For You

We help newcomers interested in learning, not help kids lie to their parents about their child’s incompetence.

{Leans over and gently replaces @Ryanstarks' toys in his pram}

Code for bipedal walking robot that is moved by six servo motors (3 in each leg).

#include <Servo.h>       //include servo library

//Creating servo objects
Servo leftAnkle;
Servo rightAnkle;
Servo leftHip;
Servo rightHip;
Servo leftShoulder;
Servo rightShoulder;


// setting initial position values for each motor
int leftAnklePos = 90;  
int rightAnklePos = 90;
int leftHipPos = 93;
int rightHipPos = 105;
int leftShoulderPos = 0;
int rightShoulderPos = 180;

int forDelay = 15;
int delayOne = 15;

int rightEye = 12;
int leftEye = 7;

boolean firstTime = true;           

////FUNCTION DEFINITION////////////////////////////////////////////////////////////////////

void centerPosition()                                  //equilibrium position for all motors
{
	leftAnkle.write(leftAnklePos);
	rightAnkle.write(rightAnklePos);  // attaches the servo on pin 9 to the servo object
	leftHip.write(leftHipPos);  // attaches the servo on pin 9 to the servo object
	rightHip.write(rightHipPos);  // attaches the servo on pin 9 to the servo object
	leftShoulder.write(leftShoulderPos);  // attaches the servo on pin 9 to the servo object
	rightShoulder.write(rightShoulderPos);  // attaches the servo on pin 9 to the servo object
	delay(1000);
}

void lowerCenter()                                                                               //equilibrium for lower body motors
{
	leftAnkle.write(leftAnklePos);
	rightAnkle.write(rightAnklePos); 
	leftHip.write(leftHipPos); 
	rightHip.write(rightHipPos);  
}


////FORWARD////////////////////////////////////////////////////////////////////////
void forward()
{    
	if (firstTime)
	{ 
		for (int i = 0; i < 15 ; i++ )
		{ leftAnkle.write(leftAnklePos-i);   //left foot  
			delay(forDelay);}

		delay(delayOne);

		for (int i = 0; i < 10 ; i++ )
		{rightAnkle.write(rightAnklePos-i);   //right foot   
			delay(forDelay);}

		for (int i = 0; i < 15 ; i++ )
		{
			rightHip.write(rightHipPos+i); 
			leftHip.write(leftHipPos+i); 
			delay(forDelay);}

		delay(delayOne);
	}

	else
	{
		for (int i = 0; i < 30 ; i++ )  
		{
			rightHip.write((rightHipPos-15)+i);  
			leftHip.write((leftHipPos-15)+i);
			delay(forDelay);}
	}

	delay(delayOne);

	for (int i = 0; i <25 ; i++)
	{
		leftAnkle.write((leftAnklePos -15)+i);   
		rightAnkle.write((rightAnklePos-10)+i);
		delay(forDelay); 
	}

	delay(delayOne);

	//Right Leg Forward

	for (int i = 0; i < 30 ; i++ )
	{
		leftHip.write((leftHipPos+15)-i);
		rightHip.write((rightHipPos+15)-i);
		delay(forDelay);
	}

	delay(delayOne);

	for (int i = 0; i <25 ; i++ )
	{
		rightAnkle.write((rightAnklePos+15)-i);   //right foot 

		if (i <= 20)
		{leftAnkle.write((leftAnklePos+10)-i);}

		delay(forDelay);  
	}

	delay(delayOne);

	firstTime = false;

}

///// LED FUNCTIONS /////////////////////////////////////////////////////////////////////////////

void ledOn()
{
	digitalWrite(rightEye, HIGH);
	digitalWrite(leftEye, HIGH);

}

void ledOff()
{ 
	digitalWrite(rightEye, LOW);
	digitalWrite(leftEye, LOW);
}

void ledBlink()
{
	ledOn();
	delay(100);
	ledOff();
	delay(100); 
}

void ledSwitchBlink()
{
	digitalWrite(rightEye, HIGH);
	delay(100);
	digitalWrite(rightEye, LOW);
	delay(100);
	digitalWrite(leftEye, HIGH);
	delay(100);
	digitalWrite(leftEye, LOW);
	delay(100);


}

///// Arm Function ///////////////////////////////////////////////////////////////////////////////

void armDemo ()
{
	handZombie();
	delay(2000);
	handDown();
}

void handZombie ()               //putting hands forward
{

	for (int i = 0; i < 90 ; i+= 5 )
	{leftShoulder.write(leftShoulderPos + i );
		rightShoulder.write(rightShoulderPos - i);}

}


void handDown ()                //putting hands down
{

	for (int i = 0; i < 90 ; i+= 5 )
	{leftShoulder.write(leftShoulderPos - i );
		rightShoulder.write(rightShoulderPos + i);}
}

///// SET UP ////////////////////////////////////////////////////////////////////////

void setup() 
{ 
	//setting outputs for LEDs 
	pinMode(12, OUTPUT);
	pinMode(7, OUTPUT);

	//setting output for motors
	leftAnkle.attach(3);  // attaches the servo on pin 3 to the servo object
	rightAnkle.attach(5);  // attaches the servo on pin 5 to the servo object
	leftHip.attach(6);  // attaches the servo on pin 6 to the servo object
	rightHip.attach(9);  // attaches the servo on pin 9 to the servo object
	leftShoulder.attach(11);  // attaches the servo on pin 11 to the servo object
	rightShoulder.attach(10);  // attaches the servo on pin 10 to the servo object



	centerPosition();                        //equilibrium position
	delay(4000);                             //delay 4 seconds

	for (int i = 0; i <10 ; i++)             //blinking LED 10 times
	{ledBlink(); }

	handZombie();                            // Hands forward
	delay(500);

	for (int i = 0; i <3 ; i++)              //Walks forward 3 times
	{forward();}  
	delay(500);

	lowerCenter();                           //lower body back to normal
	delay(1000);

	handDown();                              //puttings hands back down
} 


////LOOP FUNCTION /////////////////////////////////////////////////////////////////////////////////
void loop() 
{ 
	//empty
}

Ryanstarks:
wow thanks for all the help community of friends, i'm being sarcastic,

Did it not occur to you that the people who saw your Title did not have anything to contribute?

Stop being sarcastic and help us to help you, that is, if you really want help, rather than an excuse to complain.

If you are new to Arduino and new to programming choose a simpler project to get started with. Any type of bipedal robot would be a very challenging project even for an experienced person.

...R
Planning and Implementing a Program