Controlling the speed of a 28BYJ-48 stepper motor

Not wired like that it won't work, no ground.

Motor speed is set in software. Just take the knob control example and just use a variable assignment in place of reading the pot.