A library that works as a simple interface which makes it easier to work with common stepper motors on the Arduino platform.
- main class representing the motor
- the first pin of the motor coils
- the second pin of the motor coils
- the third pin of the motor coils
- the fourth pin of the motor coils
- delay after each step (determines the speed of continuous motor running)
- executes one motor step (the first in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the second in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the third in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the fourth in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the fifth in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the sixth in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the seventh in the sequence) and waits for
stepDelay
(ms)
- executes one motor step (the eight in the sequence) and waits for
stepDelay
(ms)
- initializes attributes and sets up input pins
- arguments:
- int pin1 - see private attributes
- int pin2 - see private attributes
- int pin3 - see private attributes
- int pin4 - see private attributes
- int stepDelay - see private attributes
- returns address of given pin
- arguments:
- uint8_t pinNumber - number of desired pin
- returns: address of desired pin
- returns value of
stepDelay
parameter - returns: value of
stepDelay
parameter
- changes value of step delay
- arguments:
- int stepDelay - new
stepDelay
value
- int stepDelay - new
- executes one forward series of steps (from 1 to 8)
- executes one backward series of steps (from 8 to 1)
The library was tested with a 28BYJ-48 stepper motor.
- none
Contributions are welcome!
The library is licensed under the MIT license.