upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
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.
Vcc goes to the 5V pin on your development board and the Vm pin should be connected to an external 5V supply.
Example driving a stepper motor
Public Member Functions | |
ULN200XA (int stepsPerRev, unsigned int i1, unsigned int i2, unsigned int i3, unsigned int i4) | |
~ULN200XA () | |
void | setSpeed (unsigned int speed) |
void | setDirection (ULN200XA_DIRECTION_T dir) |
void | stepperSteps (unsigned int steps) |
void | release () |
Protected Attributes | |
uln200xa_context | m_uln200xa |
ULN200XA | ( | int | stepsPerRev, |
unsigned int | i1, | ||
unsigned int | i2, | ||
unsigned int | i3, | ||
unsigned int | i4 | ||
) |
ULN200XA constructor
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)
speed | Speed to set the motor to, in RPM |
void setDirection | ( | ULN200XA_DIRECTION_T | dir | ) |
Sets the direction of the motor, clockwise or counterclockwise
dir | Direction to set the motor to |
void stepperSteps | ( | unsigned int | steps | ) |
Steps the stepper motor a specified number of steps
steps | Number of steps to move the stepper motor |
void release | ( | ) |
Releases the stepper motor by removing power