Let's Make Robots!

Simplebotics'es code

PLEASE DON'T CARE ABOUT THIS, THIS IS FOR SIMPLEBOTICS:

 

 

//Arduino minibiped code

//By BotFIN

//You can use this code if you get permission from SimpleBotics

 

#include <Servo.h>

Servo foot1;

Servo foot2;

Servo leg1;

Servo leg2;

 

int posf1 = 90;

int posf2 = 90;

int posl1 = 90;

int posl2 = 90;

 

void setup()

{

 foot1.attach(9);

 foot2.attach(6);

 leg1.attach(5);

 leg2.attach(3);

}

 

void loop()

 

{

 for(posf1 = 90; posf1 < 130; posf1 += 1)

 {

   foot1.write(posf1);

   delay(250);

 }

 for(posl1 = 90; posl1 < 130; posl1 += 1)

 {

   leg1.write(posl1);

   delay(250);

 }

 for(posf1 = 130; posf1>=90; posf1 -=1)

 {

   foot1.write(posf1);

   delay(250);

 }

 

 for(posf2 = 90; posf2 < 50; posf2 += 1)

 {

   foot2.write(posf2);

   delay(250);

 }

 for(posl2 = 90; posl2 < 50; posl2 += 1)

 {

   leg2.write(posl2);

   delay(250);

 }

 for(posf1 = 50; posf1>=90; posf1 -=1)

 {

   foot2.write(posf2);

   delay(250);

 }

}