Controlling stepper 28byj-48

Hi guys, I have a question about this motor. Is it possible for this motor to do like this?
Let's said I need the motor to rotate 80 degree, but I want him rotate 10 degree and stop until it reach 80 degree. It is possible to program it to work like this?

Yes it is possible.

What stepper driver are you using?

groundFungus:
Yes it is possible.

What stepper driver are you using?

Sorry for late reply. I using 28byj-48 stepper motor with ULN2003. I have a problem is like this, let's said my motor move to 10 degree. I wanted to set the current moved angle which is 10 degree = current position, if the motor haven't reach 80 degree, it will move and keep updating the current position until it is 80 degrees. But how can I set the "moved step" as my current position ?

Which stepper library are you using?

MarkT:
Which stepper library are you using?

I'm using accelstepper library.

Hello,

This engine model has 4096 steps per revolution, it may be easier to make the program without using a library if you do not need acceleration

Someone has provided a code that might be useful for you:

stepper motor & servo motor arduino sketches without using libraries

// Code by : Gautam Gundap
      
// this sketch swings stepper motor 28BYJ-48 with ULN2008 as driver to one full revolution in clockwise direction and one full revolution in counter clockwise direction and keeps doing this. The speed can be varied in delay command(do not try to exceed the maximum speed as per data sheet of this stepper motor. This motor has a gear ratio of 1:64 and a single step angle of 5.625 degrees on the output shaft. Hence in 64 steps of output shaft it completes 360 degrees i.e. one revolution. The motor has actually taken 64x64 steps for one complete shaft revolution which is 4096 steps. The for loop takes 8 steps and multiplied by 512 iterations makes it a total of 4096 steps for one complete shaft revolution.The switchOutput array consists of one complete switching sequence for this stepper as per its datasheet. The Arduino register commands are used here for faster response. The serial monitor displays the completion of a set of cw and ccw revolution. 

// Connect the 4 wires from the driver pcb to D2,D3,D4,D5 of arduino uno

int count = 0;   

int switchOutput[8] = {B00100000, B00110000, B00010000, B00011000, B00001000, B00001100, B00000100, B00100100};

void setup() 
{

  DDRD = DDRD | B00111100;
  Serial.begin(115200);
}

void loop()
{
  if(count < 512 )
    cw();
  else if (count == 1024)
{
    Serial.println("Swing cw and ccw complete"); 
    count = 0;
}
  else
    ccw();
  count++;
}

void ccw()
{
  for(int i = 0; i < 8; i++)
  {
    pinOutput(i);
    delay(1);
  }
}

void cw()
{
  for(int i = 7; i > -1; i--)
  {
    pinOutput(i);
    delay(1);
  }
}

void pinOutput(int out)
{
int buffer = B00000000;
buffer=PORTD | switchOutput[out];
PORTD=buffer & switchOutput[out];
}

Okay, I will look at ot first since the motor get me frustrated. I'm just noob in Arduino.

It has a code that should be easier for you to use,

Note the part that does the steps, if you calculate how many steps are necessary for the displacement that you need, it should be possible to use the library routine:

// move a number of steps...
stepper.step(number_of_steps);

/*
 * MotorKnob
 *
 * A stepper motor follows the turns of a potentiometer
 * (or other sensor) on analog input 0.
 *
 * http://www.arduino.cc/en/Reference/Stepper
 * This example code is in the public domain.
 */

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup() {
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);
}

void loop() {
  // get the sensor value
  int val = analogRead(0);

  // move a number of steps equal to the change in the
  // sensor reading
  stepper.step(val - previous);

  // remember the previous value of the sensor
  previous = val;
}

Source: https://www.arduino.cc/en/Tutorial/MotorKnob