Skip to main content

Arduino Library

The Soldered Basic Stepper Driver Arduino Library wraps AccelStepper by AirSpayce. BasicStepper subclasses AccelStepper and adds nothing of its own, so everything AccelStepper can do is available here, and the library is GPL v3 licensed as a result.

For this board, construct it with BasicStepper::DRIVER and two pins. That is the step-and-direction interface, and it is what the DRV8825 presents.

Not installed yet? Follow Quick Start before using the functionality pages.

Which interface to use​

The constructor's first argument picks how the motor is driven. Only DRIVER applies to this board.

InterfaceValueWhat it drives
DRIVER1A step-and-direction driver such as this one. Two pins: STEP and DIR.
FULL2WIRE2A 2-wire stepper driven directly. Two motor pins.
FULL3WIRE3A 3-wire stepper such as an HDD spindle. Three motor pins.
FULL4WIRE4A 4-wire stepper driven directly. Four motor pins. This is the constructor default.
HALF3WIRE6A 3-wire half stepper. Three motor pins.
HALF4WIRE8A 4-wire half stepper. Four motor pins.

Functionality​

Each page starts with one verified library example and explains every function the example uses to get that result.

Because the examples come from AccelStepper unchanged, most of them are constructed with BasicStepper stepper;, which the library header defines as FULL4WIRE on pins 2, 3, 4 and 5 for a directly driven motor. DualMotorShield.ino is the only one that already uses BasicStepper::DRIVER. Every page above shows the constructor changed to DRIVER with real STEP and DIR pins; the rest of each sketch is as shipped.