Because of the high gear ratio (64 to 1), the highest RPM I've gotten is about 13 RPM without acceleration. With the AccelStepper library I was able to get about 24 RPM (820 steps per second). Install the AccelStepper lib from the Arduino IDE library manager and try it.
PS For the 28BYJ-48, steps per second = RPM * 2048 / 60.
// Bounce.ino
// -*- mode: C++ -*-
//
// Make a single stepper bounce from one limit to another
//
// Copyright (C) 2012 Mike McCauley
// $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $
#include <AccelStepper.h>
// Define a stepper and the pins it will use
AccelStepper stepper(4, 8, 10, 9, 11);
void setup()
{
// Change these to suit your stepper if you want
stepper.setMaxSpeed(820);
stepper.setAcceleration(1000);
stepper.moveTo(2048);
}
void loop()
{
// If at the end of travel go to the other end
if (stepper.distanceToGo() == 0)
stepper.moveTo(-stepper.currentPosition());
stepper.run();
}