the stepper motor is not rotating just vibrating

I am using a 28BYJ-48 Stepper motor

#include <Stepper.h>
const int stepsPerRevolution=4096;
Stepper leftStepper(8,9,10,11);
void setup() {
// put your setup code here, to run once:
leftStepper.setSpeed(20);
pinMode(8, OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
leftStepper.step(stepsPerRevolution);
delay(100);
}

Try with a much lower speed, after consulting the documentation for the motor driver library.

If that doesn't help, the motor wires may be swapped. With the power off, swap a pair of wires, power up and try again. If that doesn't fix the problem, repeat with another pair of wires.

PS: please read the "How to use this forum" post for instructions on how to post code properly and which important details to provide.

Check your wiring. If you've been following the usual tutorials for the 28BYJ then the connection you have as Stepper leftStepper(8,9,10,11); should be Stepper leftStepper(8,10,9,11);

This seems strange

const int stepsPerRevolution=4096;

to the best of my knowledge (see this web page) the 28BYJ motors have 32 full steps per revolution of the motor

...R

@Robin2 from the web page you posted:

These means that in the recommended half-step mode we will have:64 steps per motor rotation x 63.684 gear ratio = 4076 steps per full revolution (approximately).

Hutkikz:
@Robin2 from the web page you posted:

Very true. However the Arduino is controlling the motor, not the output shaft.

...R