Все, спасибо всем. наконецто я добился чего хотел выкладываю скеч, может кому пригодиться
PHP код:
#include <Stepper.h>

#define STEPS 360 

Stepper stepper(STEPS, 2, 3, 4, 5);
int pol = 5; 
int x = 0 ;
void setup() 
{ 
  
stepper.setSpeed(30);
//  Serial.begin(9600);
stepper.step(-1000); // место этого возможно будет концевик, что бы не делать лишнии шаги
 
} 

void loop() 
{ 
  
digitalWrite(2, 0);
  
digitalWrite(3, 0);
  
digitalWrite(4, 0);
  
digitalWrite(5, 0);
 
// int sensorValue = analogRead(5);
 // Serial.println(sensorValue, DEC);
  //******************
  //******************
  // ПОЛОЖЕНИЕ 1
  //******************
  //******************
  
if ((261 <= analogRead(pol) ) && ( analogRead(pol) <=265) && (x != 1) ) 
  { 
    if (
x == 9)  
    { 
      
stepper.step(-1000); 
      
x=1;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-875); 
      
x=1;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-750); 
      
x=1;  
    }
    if (
x == 6)  
    { 
      
stepper.step(-625); 
      
x=1;  
    }
    if (
x == 5)  
    { 
      
stepper.step(-500); 
      
x=1;  
    }
    if (
x == 4)  
    { 
      
stepper.step(-375); 
      
x=1;  
    }
    if (
x == 3)  
    { 
      
stepper.step(-250); 
      
x=1;  
    }
    if (
x == 2)  
    { 
      
stepper.step(-125); 
      
x=1;  
    }
  }
  
//******************
  //******************
  // ПОЛОЖЕНИЕ 2
  //******************
  //******************

  
if ((284 <= analogRead(pol) ) && ( analogRead(pol) <=288) && (x != 2) ) 
  { 
       if (
x == 0)  
    { 
      
stepper.step(125); 
      
x=2;  
    }

    if (
x == 1)  
    { 
      
stepper.step(125); 
      
x=2;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-875); 
      
x=2;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-750); 
      
x=2;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-625); 
      
x=2;  
    }
    if (
x == 6)  
    { 
      
stepper.step(-500); 
      
x=2;  
    }
    if (
x == 5)  
    { 
      
stepper.step(-375); 
      
x=2;  
    }
    if (
x == 4)  
    { 
      
stepper.step(-250); 
      
x=2;  
    }
    if (
x == 3)  
    { 
      
stepper.step(-125); 
      
x=2;  
    }

  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 3
  //******************
  //******************


  
if ((313 <= analogRead(pol) ) && ( analogRead(pol) <=316) && (x != 3) ) 
  { 
       if (
x == 0)  
    { 
      
stepper.step( 250  ); 
      
x=3  ;  
    }

      if (
x == 1)  
    { 
      
stepper.step(250); 
      
x=3;  
    }
    if (
x == 2)  
    { 
      
stepper.step(125); 
      
x=3;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-750); 
      
x=3;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-625); 
      
x=3;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-500); 
      
x=3;  
    }
    if (
x == 6)  
    { 
      
stepper.step(-375); 
      
x=3;  
    }
    if (
x == 5)  
    { 
      
stepper.step(-250); 
      
x=3;  
    }
    if (
x == 4)  
    { 
      
stepper.step(-125); 
      
x=3;  
    }


  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 4
  //******************
  //******************

  
if ((348 <= analogRead(pol) ) && ( analogRead(pol) <=351) && (x != 4) ) 
  { 
    
      if (
x == 0)  
    { 
      
stepper.step(  375 ); 
      
x= 4 ;  
    }


       if (
x == 1)  
    { 
      
stepper.step(375); 
      
x=4;  
    }
    if (
x == 2)  
    { 
      
stepper.step(250); 
      
x=4;  
    }
    if (
x == 3)  
    { 
      
stepper.step(125); 
      
x=4;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-625); 
      
x=4;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-500); 
      
x=4;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-375); 
      
x=4;  
    }
    if (
x == 6)  
    { 
      
stepper.step(-250); 
      
x=4;  
    }
    if (
x == 5)  
    { 
      
stepper.step(-125); 
      
x=4;  
    }



  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 5
  //******************
  //******************

  
if ((389 <= analogRead(pol) ) && ( analogRead(pol) <=395) && (x != 5) ) 
  { 
      if (
x == 0)  
    { 
      
stepper.step( 500  ); 
      
x=5  ;  
    }

   if (
x == 1)  
    { 
      
stepper.step(500); 
      
x=5;  
    }
    if (
x == 2)  
    { 
      
stepper.step(375); 
      
x=5;  
    }
    if (
x == 3)  
    { 
      
stepper.step(250); 
      
x=5;  
    }
    if (
x == 4)  
    { 
      
stepper.step(125); 
      
x=5;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-500); 
      
x=5;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-375); 
      
x=5;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-250); 
      
x=5;  
    }
    if (
x == 6)  
    { 
      
stepper.step(-125); 
      
x=5;  
    }


  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 6
  //******************
  //******************

  
if ((445 <= analogRead(pol) ) && ( analogRead(pol) <=451) && (x != 6) ) 
  { 
    
      if (
x == 0)  
    { 
      
stepper.step( 625  ); 
      
x=  6;  
    }


     if (
x == 1)  
    { 
      
stepper.step(625); 
      
x=6;  
    }
    if (
x == 2)  
    { 
      
stepper.step(500); 
      
x=6;  
    }
    if (
x == 3)  
    { 
      
stepper.step(375); 
      
x=6;  
    }
    if (
x == 4)  
    { 
      
stepper.step(250); 
      
x=6;  
    }
    if (
x == 5)  
    { 
      
stepper.step(125); 
      
x=6;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-375); 
      
x=6;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-250); 
      
x=6;  
    }
    if (
x == 7)  
    { 
      
stepper.step(-125); 
      
x=6;  
    }

  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 7
  //******************
  //******************

  
if ((518 <= analogRead(pol) ) && ( analogRead(pol) <=525) && (x != 7) ) 
  { 
      if (
x == 0)  
    { 
      
stepper.step( 750  ); 
      
x= 7 ;  
    }

    if (
x == 1)  
    { 
      
stepper.step(750); 
      
x=7;  
    }
    if (
x == 2)  
    { 
      
stepper.step(625); 
      
x=7;  
    }
    if (
x == 3)  
    { 
      
stepper.step(500); 
      
x=7;  
    }
    if (
x == 4)  
    { 
      
stepper.step(375); 
      
x=7;  
    }
    if (
x == 5)  
    { 
      
stepper.step(250); 
      
x=7;  
    }
    if (
x == 6)  
    { 
      
stepper.step(125); 
      
x=7;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-250); 
      
x=7;  
    }
    if (
x == 8)  
    { 
      
stepper.step(-125); 
      
x=7;  
    } 


  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 8
  //******************
  //******************

  
if ((620 <= analogRead(pol) ) && ( analogRead(pol) <=630) && (x != 8) ) 
  {  
      if (
x == 0)  
    { 
      
stepper.step( 875  ); 
      
x= 8 ;  
    }

    if (
x == 1)  
    { 
      
stepper.step(875); 
      
x=8;  
    }
    if (
x == 2)  
    { 
      
stepper.step(750); 
      
x=8;  
    }
    if (
x == 3)  
    { 
      
stepper.step(625); 
      
x=8;  
    }
    if (
x == 4)  
    { 
      
stepper.step(500); 
      
x=8;  
    }
    if (
x == 5)  
    { 
      
stepper.step(375); 
      
x=8;  
    }
    if (
x == 6)  
    { 
      
stepper.step(250); 
      
x=8;  
    }
    if (
x == 7)  
    { 
      
stepper.step(125); 
      
x=8;  
    }
    if (
x == 9)  
    { 
      
stepper.step(-125); 
      
x=8;  
    }
  }
//******************
  //******************
  // ПОЛОЖЕНИЕ 9
  //******************
  //******************

  
if ((770 <= analogRead(pol) ) && ( analogRead(pol) <=780) && (x != 9) ) 
  { 
    
     if (
x == 0)  
    { 
      
stepper.step(1000); 
      
x=9;  }
       if (
x == 1)  
    { 
      
stepper.step(1000); 
      
x=9;  
    }
    if (
x == 2)  
    { 
      
stepper.step(875); 
      
x=9;  
    }
    if (
x == 3)  
    { 
      
stepper.step(750); 
      
x=9;  
    }
    if (
x == 4)  
    { 
      
stepper.step(625); 
      
x=9;  
    }
    if (
x == 5)  
    { 
      
stepper.step(500); 
      
x=9;  
    }
    if (
x == 6)  
    { 
      
stepper.step(375); 
      
x=9;  
    }
    if (
x == 7)  
    { 
      
stepper.step(250); 
      
x=9;  
    }
    if (
x == 8)  
    { 
      
stepper.step(125); 
      
x=9;  
    }

  }
}