How and what do i need to control 2 x servos?

Hi

I am new to Arduino have just found out it may do what i need it to do.

I need Arduino to control two servos independently ie with the remote up/down for one of the servo and left/right for other servo.

Speed would need to be controled as the servos would need to turn slow.

What componets do i need and how do i do it?

Thanks for your time and help

A quick google search returns a ton of information.

These may help:

http://playground.arduino.cc/ComponentLib/Servo

Start with one servo, and once you understand how that works, then move to add the other one.

Have a look at the examples that come with the Arduino IDE - especially the servo-sweep example.

What are you thinking of using to provide the control inputs? - for example push-button switches or potentiometers, or a joystick that contains potentiometers.

Read as many Forum Threads as you can - they are a great source of knowledge, including "what not to do".

Have a look at planning and implementing a program.

This Thread about controls for an excavator may be of interest.

...R

I need Arduino to control two servos independently ie with the remote up/down for one of the servo and left/right for other servo. Speed would need to be controled as the servos would need to turn slow.

Below is a discussion on controlling the movement speed of a servo. Bottom is code for sending independent position commands to servos.

http://forum.arduino.cc/index.php/topic,61586.30.html

//zoomkat 11-22-12 simple delimited ',' string parse 
//from serial port input (via serial monitor)
//and print result out serial port
//multi servos added 
// Powering a servo from the arduino usually *DOES NOT WORK*.

String readString;
#include <Servo.h> 
Servo myservoa, myservob, myservoc, myservod;  // create servo object to control a servo 

void setup() {
  Serial.begin(9600);

  //myservoa.writeMicroseconds(1500); //set initial servo position if desired

  myservoa.attach(6);  //the pin for the servoa control
  myservob.attach(7);  //the pin for the servob control
  myservoc.attach(8);  //the pin for the servoc control
  myservod.attach(9);  //the pin for the servod control 
  Serial.println("multi-servo-delimit-test-dual-input-11-22-12"); // so I can keep track of what is loaded
}

void loop() {

  //expect single strings like 700a, or 1500c, or 2000d,
  //or like 30c, or 90a, or 180d,
  //or combined like 30c,180b,70a,120d,

  if (Serial.available())  {
    char c = Serial.read();  //gets one byte from serial buffer
    if (c == ',') {
      if (readString.length() >1) {
        Serial.println(readString); //prints string to serial port out

        int n = readString.toInt();  //convert readString into a number

        // auto select appropriate value, copied from someone elses code.
        if(n >= 500)
        {
          Serial.print("writing Microseconds: ");
          Serial.println(n);
          if(readString.indexOf('a') >0) myservoa.writeMicroseconds(n);
          if(readString.indexOf('b') >0) myservob.writeMicroseconds(n);
          if(readString.indexOf('c') >0) myservoc.writeMicroseconds(n);
          if(readString.indexOf('d') >0) myservod.writeMicroseconds(n);
        }
        else
        {   
          Serial.print("writing Angle: ");
          Serial.println(n);
          if(readString.indexOf('a') >0) myservoa.write(n);
          if(readString.indexOf('b') >0) myservob.write(n);
          if(readString.indexOf('c') >0) myservoc.write(n);
          if(readString.indexOf('d') >0) myservod.write(n);
        }
         readString=""; //clears variable for new input
      }
    }  
    else {     
      readString += c; //makes the string readString
    }
  }
}

I would like control it via a 21 inch touch screen monitor connected to my pc. Would i need additional hardware to use a touch screen ?

Im buying one of theses are they good?

Arduino-Compatible R3 UNO ATmega16U2 AVR USB Board http://m.banggood.com/index.php?com=detail&t=index&products_id=68537

Im buying one of theses are they good?

Did you read the reviews?

Yes i did see the reviews and it had loads of good reviews.

I bought one of the below and it worked as expected. $4.08 including shipping is a deal.

http://www.ebay.com/itm/261653306720?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT