UPM module for the ULN200XA Darlington Stepper Driver.
More...
This module was developed on a ULN2003A Stepper Driver. It should also support the ULN2001A, ULN2002A, and ULN2004A devices, when using to drive the 28BYJ-48 unipolar stepper motor.
Example driving a stepper motor
cout << "Rotating 1 revolution clockwise." << endl;
cout << "Sleeping for 2 seconds..." << endl;
sleep(2);
cout << "Rotating 1/2 revolution counter clockwise." << endl;
ULN200XA |
( |
int |
stepsPerRev, |
|
|
unsigned int |
i1, |
|
|
unsigned int |
i2, |
|
|
unsigned int |
i3, |
|
|
unsigned int |
i4 |
|
) |
| |
ULN200XA constructor
- Parameters
-
stepsPerRev | Number of steps per full revolution |
i1 | Digital pin to use for stepper input 1 |
i2 | Digital pin to use for stepper input 2 |
i3 | Digital pin to use for stepper input 3 |
i4 | Digital pin to use for stepper input 4 |
void setSpeed |
( |
unsigned int |
speed | ) |
|
Sets the speed of the stepper motor in revolutions per minute (RPM)
- Parameters
-
speed | Speed to set the motor to, in RPM |
void setDirection |
( |
ULN200XA_DIRECTION_T |
dir | ) |
|
Sets the direction of the motor, clockwise or counterclockwise
- Parameters
-
dir | Direction to set the motor to |
void stepperSteps |
( |
unsigned int |
steps | ) |
|
Steps the stepper motor a specified number of steps
- Parameters
-
steps | Number of steps to move the stepper motor |
Releases the stepper motor by removing power
The documentation for this class was generated from the following files: