I just had another question come to mind. I've read somewhere that you can use a servo as a sensor. If thats the case, then with a SDcard shield would I be able to record live readings from the servos and play them back?

That depends on what you want to sense. As AWOL says, if you want to get the physical position you would need to modify the servo. But if you want to play back a sequence of servo movements its much easier to either store the values (and time) that are written to the servos, or to regularly read and store the servo position using servo.read().

Hi, my name is Guzz and i'm new on the arduino world. I'm having some trouble to write a code to control 4 servos with a arduino, and i dont know what can be wrong with my code, i'm not a programmer (yet). I wrote this code based on de sweep code from the arduino examples. The code compiles fine, but when i try to upload to the board it crashes. Im using the arduino duemilanove with atmega 328. The code is like this...

#include <Servo.h>

Servo myservo0; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos0 = 0; // variable to store the servo position

Servo myservo1; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos1 = 0; // variable to store the servo position

Servo myservo2; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos2 = 0; // variable to store the servo position

Servo myservo3; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos3 = 0; // variable to store the servo position

void setup() { myservo0.attach(9); // attaches the servo on pin 9 to the servo object myservo1.attach(; // attaches the servo on pin 8 to the servo object myservo2.attach(7); // attaches the servo on pin 7 to the servo object myservo3.attach(5); // attaches the servo on pin 5 to the servo object }

If you're powering the four servos from the Arduino, it is likely that the crash is due to the excessive current being drawn, pulling down the voltage to the processor and causing it to brown-out or reset.

Power the servos from a separate supply (4 AA batteries should do it), and remember to common the grounds.

I can't see anything obvious in your code that would cause a crash.

Please use the Code (#) button when posting code, and it is best not to hijack other threads.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.Do not send technical questions via personal messaging - they will be ignored.