Can't make my stepper motor run clockwise and counterclockwise with AccelStepper Library
The  “Performance” paragraph of the “Detailed Description” section of AccelStepper documentation says:


  The fastest motor speed that can be reliably supported is about 4000 steps per second at a clock frequency of 16 MHz on Arduino such as Uno etc. ...


and the AccelStepper::setSpeed () documentation says:


  ... Speeds of more than 1000 steps per second are unreliable


Try changing your 6400-steps-per-second setting to a some plausible number, eg 500 or 1000.  

Actually, it would make sense to start out with moderate destination settings and speeds, like a target position of 200 instead of 16000, and steps-per-second of 100, or whatever count it takes for say exactly two shaft revolutions.  Once you have that working right, then start doubling numbers until it no longer works, after which you can back off by a factor of say four (to allow for variations in load, etc).