Motor Vibrating and not doing one revolution

I am trying to turn a 4 wire stepper motor connected to an L298N motor driver, but the motor either vibrates, or turns slightly back and forth. I am pretty sure the problem is I only have a 9V power source instead of a 12V power source, but I am not sure.

Stepper Motor Code:

// Include the Stepper library:
#include <Stepper.h>
// Define number of steps per revolution:
const int stepsPerRevolution = 200;
// Initialize the stepper library on pins 8 through 11:
Stepper myStepper = Stepper(stepsPerRevolution, 2, 3, 4, 5);
void setup() {
  // Set the motor speed (RPMs):
  myStepper.setSpeed(60);
}
void loop() {
  // Step one revolution in one direction:
  myStepper.step(200);
  delay(2000);
  // Step on revolution in the other direction:
  myStepper.step(-200);
  delay(2000);
}

Obviously the first thing to try is a 12v power supply, and we can't do that for you.

Also try a very slow stepper speed to start with.

If you need more help please post a link to the datasheet for your stepper motor - it may well not be suited to an L298 as a driver.

...R
Stepper Motor Basics
Simple Stepper Code

Most modern steppers are completely unsuitable for anything but a chopper style constant current
stepper chip like the DRV8825, A4988 and many others. If the winding resistance is less than 20
ohms or so this will be the problem.

9v power source.
Niiiiiiiinnnnnnneeeee voooooooooolllllt power source.

Are you using a smoke detector battery to power a motor? That always ends in frustrating failure.