stepper motor example code

Hello, I have a stepper motor

and I'm trying to learn how to program it to turn.

I wonder if someone could write me a simple code that rotates the motor 45 degrees right and then back, and then it stops. I have tried with alot of example codes but i don't get the structure of them.

Would really appreciate if someone could write a simple test code doing the above.

Thanks in advance

Googlr "arduino" stepper motor example

We don' t do your homework

If you are trying to learn you are not trying hard enough if you haven't googled anything and ask us to do it for you.

Be even more specific and Google Arduino 28BYJ stepper motor.

There are lots of Threads on the Forum about those motors.

...R

Lot of information on Steppers and pointers to example code on the ArduinoInfo.Info WIKI HERE:

http://www.codeproject.com/Articles/699986/An-Arduino-Library-to-Control-the-BYJ-Stepper