Help with code for 59 continuous steps

Hey guys,

I'm new to the arduino boards and coding all together so I know searching would take me a long time and yield very little. Im working on a project and need to set up the step motor for it to make 59 continuous steps until stop. The time frame isn't crucial. It can range from a second to five seconds. As long as it doesnt take an hour.

Since many of you are good at coding, this would probably only take you a minute or so. Please help me out as I really need to automate this process so that I can continue in my research.

Ideally, the function should be executed every time a button is pressed but so far I have only done the basics that the manual provides so I will be doing further research on that. Thanks a lot and if this requires a monetary compensation, I can look into that also.

Please guys, help me out.

P.S. I have the OSEPP Uno R3 Plus board and am using the 28byj-48 5v dc motor (which i take has 48 steps, 7.5 degrees each).

Look at the Stepper library and the AccelStepper library.

They are the easiest way to control that sort of stepper - I believe it is a 5-wire unipolar motor.

What sort of stepper driver are you using? You can't drive a motor directly from an Arduino board. Maybe the board you mention has extra parts for motor control?


Thanks for the reply Robin! I will look into those libraries shortly.

Yes, you are correct. I am using a 5 wire unipolar motor that came with the board.

The stepped driver is: MO01, SUNSCO, VCC: 5-24V