Cool lill block of code to control my 4 servos,

Made a Lill block (4650 Bytes) of code to control all the movments of my 4 servos

Heres a very short vid of them panning 180, Yes very boring…

This Second video is what I have made with 4 Servos and a Block of code, Made a lill Arm Worked alight

#include <Servo.h>//Servo Header
Servo Servo1,Servo2,Servo3,Servo4;//Declare Servos
Servo servo[]={Servo1,Servo1,Servo2,Servo3,Servo4};//Toss Into Array
int Pin[]={12,11,10,9};//Toss pins used into array
int CurrentPos[5];//Var for Current Postion

class ServoC{//Servo Class, Move, Update, Enable
  void Move(int,int,int,int,int,int,int,int,char,char,char,char,int);
  int Update(int);
  void Enable();

int ServoC::Update(int ServoNum){//Gets servo Pos

void ServoC::Enable(){//Enable Servos
  for(int i=0;i<4;i++){

void ServoC::Move(int ServoNumber1,int ServoNumber2,int ServoNumber3,int ServoNumber4,int Servo1Deg,int Servo2Deg,int Servo3Deg,int Servo4Deg, char MoveType1, char MoveType2, char MoveType3, char MoveType4, int Spe){
  int Max=0;//Max Value for the For loop
  int Fmax[]={Servo1Deg,Servo2Deg,Servo3Deg,Servo4Deg};//Array for servo Degres
  for(int i=0;i<4;i++){
    if(Fmax[i]>Max){//Finds largest number in the array
      Max=Fmax[i];//Saves it

  if(ServoNumber1!=0)CurrentPos[ServoNumber1]=Update(ServoNumber1);//If servo Number != 0 Update
  if(ServoNumber2!=0)CurrentPos[ServoNumber2]=Update(ServoNumber2);//If servo Number != 0 Update
  if(ServoNumber3!=0)CurrentPos[ServoNumber3]=Update(ServoNumber3);//If servo Number != 0 Update
  if(ServoNumber4!=0)CurrentPos[ServoNumber4]=Update(ServoNumber4);//If servo Number != 0 Update

// Movement types
// + <- Adds Value to current posstion
// - <- Subtracts Value to current posstion
// = <- Makes servo go to Value

  for(int i=0;i<Max;i++){//For loop for movment



void setup(){
  ServoC S;

void loop()
  ServoC S;
  int time=1000;
  1//Servo 1 
  ,2//Servo 2
  ,3//Servo 3
  ,4//Servo 4
  ,180//Servo 1 Angle will be 180
  ,10//Servo 2 Angle will be 10
  ,80//Servo 1 Angle will be 18
  ,0//Servo 1 Angle will be 0
  ,'='//Servo 1 Angle will goto Angle
  ,'='//Servo 2 Angle will goto Angle
  ,'='//Servo 3 Angle will goto Angle
  ,'='//Servo 4 Angle will goto Angle
  ,10//Speed of servo per degree tick, +/- 50 degrees would take 500ms, Largest number is used for ammount of ticks

Added Coments
Added newer Code
Added 2nd Video

Cool machine ya got there. I like it.

What do you plan on doing with it (besides depositing old RAM off camera ;))?

Hehe, yea camera could have been in alot better place. And It went sort fast at times making motion blur, Crap camera only does 30 fps. But for 24$ I cant complain.

Well I eventuly building the next "version" out of brass box tubing. It will be alot lighter, stronger, lill smaller, And im sick of waiting for glue to dry. Also it will be mounted on wheels driven by 2 gear moters. And figure out what im gonna do with my other 2 servos, Probally just use it for my joints. Replaced one in the base with a much stronger one. The other was replaced in the 1st joint it dint have any troque.