The way we walk...

Rant Over
Did anyone spot my rant there in the middle of that? I’m done ranting now.

See

See http://www.arduino.cc/playground/ComponentLib/Servo and http://www.arduino.cc/playground/Learning/SingleServoExample

The attached code is an archive, which packs a lot of files beside the code I wrote myself. My code is in FourServoWalker.cpp

Thanks. These examples will
Thanks. These examples will help.

im confuzled
can i just copy and paste that code into the arduino enviorement, what is the appletfolder for, what bo ido with it ,imnew to arduino and so far ive got a servo sweeping but thats it. any help would be greatly appriciated , beacuse when i just copy and paste it i get a whole bunch of weird errors

what errors are you getting?
what errors are you getting?

the main one is
the main one is error:‘refresh’ is not a member of ‘servo’

That sentence doesn’t make
That sentence doesn’t make much sense, but if you are having a problem with the servo library, make sure that you use the correct one. I used this one: http://www.arduino.cc/playground/ComponentLib/Servo

i did a little testing and

i did a little testing and you need the modified servo library

i have hosted it on my site so click here to download

on the regular servo library reshresh is not defined as a function

tried that butto no avail :frowning:
tried that butto no avail :frowning:

What errors do you get? I
What errors do you get? I must admit it’s been a long while since I played with that code and the walker is just lying in a shoebox right now.

hey, nice. that was what

hey, nice. that was what my origional design was, but i liked the more humaniod look better, personally.

 

love the autonomy!

Control 4 Servos??
Hi, I am new to robotics. I have a Arduino and some servos. Could anyone please explain me in detail that how do you control 4 servos with the Arduino. Please give me diagram, source code etc whatever is possible and you think a new comer like me will need.
Thank You.

The servo library

Hi,

I haven’t looked at this for some time and I’m not sure that I have the sourcecode any more. But take a look at the arduino servo library: http://www.arduino.cc/en/Reference/Servo. After version 017, it should be able to control up to 12 servos. I haven’t had a chance to test this. Otherwise, look at the servo lib I used: http://www.arduino.cc/playground/ComponentLib/Servo.

Good luck

ooops

Pressed “post” twice… Deleted the copy

hi Jesper,can u send me the

hi Jesper,

can u send me the modified servo library. the link on the first page seems to be broken.

Servos

Hello! i made a code that can control 5 servos with 5 potentiometers. I wrote the program for my robot arm.

// By Will Staffan 1/30/12

// Controls 5 servos using potentiometers.

// based on the tutorial sketch

 

#include <Servo.h>

 

Servo myservo1;  // create servo object to control the first servo

Servo myservo2;  // create servo object to control the second servo

Servo myservo3;  // create servo object to control the third servo

Servo myservo4;  // create servo object to control the fourth servo

Servo myservo5;  // create servo object to control the fifth servo

 

int potpin1 = 0;  // analog pin used to connect the first potentiometer

int val1;    // variable to read the value from the first analog pin

int potpin2 = 1;  // analog pin used to connect the second potentiometer

int val2;    // variable to read the value from the second analog pin

int potpin3 = 2;

int val3;

int potpin4 = 3;

int val4;

int potpin5 = 4;

int val5;

 

void setup()

{

  myservo1.attach(9);  // attaches the first servo on pin 9 to the servo object

  myservo2.attach(3);  // attaches the second servo on pin 11 to the servo object

  myservo3.attach(5);

  myservo4.attach(6);

  myservo5.attach(10);

 

}

 

void loop()

{

  val1 = analogRead(potpin1);            // reads the value of the first potentiometer (value between 0 and 1023)

  val1 = map(val1, 0, 1023, 0, 179);     // scale it to use it with the first servo (value between 0 and 180)

  myservo1.write(val1);                  // sets the first servos position according to the scaled value

  delay(15);

//  

  val2 = analogRead(potpin2);            // reads the value of the second potentiometer value between 0 and 1023

  val2 = map(val2, 0, 1023, 0, 179);     // scale it to use it with the second servo (value between 0 and 180)

  myservo2.write(val2);                  // sets the second servos position according to the scaled value

  delay(15);

//

 val3 = analogRead(potpin3);

 val3 = map(val3, 0, 1023, 0, 179);

 myservo3.write(val3);

 delay(15);

//

 val4 = analogRead(potpin4);

 val4 = map(val4, 0, 1023, 0, 179);

 myservo4.write(val4);

 delay(15);

//

 val5 = analogRead(potpin5);

 val5 = map(val5, 0, 1023, 0, 179);

 myservo5.write(val5);

 delay(15);

}

 

Nice work!

I like this little bipod robot.