Adafruit Motor Shield V2 Arduino Library
|
#include <Adafruit_MotorShield.h>
Public Member Functions | |
Adafruit_StepperMotor (void) | |
Create a StepperMotor object, un-initialized! You should never call this, instead have the Adafruit_MotorShield give you a StepperMotor object with Adafruit_MotorShield.getStepper. | |
void | setSpeed (uint16_t) |
Set the delay for the Stepper Motor speed in RPM. More... | |
void | step (uint16_t steps, uint8_t dir, uint8_t style=SINGLE) |
Move the stepper motor with the given RPM speed, don't forget to call Adafruit_StepperMotor.setSpeed to set the speed! More... | |
uint8_t | onestep (uint8_t dir, uint8_t style) |
Move the stepper motor one step only, with no delays. More... | |
void | release (void) |
Release all pins of the stepper motor so it free-spins. | |
Friends | |
class | Adafruit_MotorShield |
Let MotorShield create StepperMotors. | |
Object that controls and keeps state for a single stepper motor
void Adafruit_StepperMotor::setSpeed | ( | uint16_t | rpm | ) |
Set the delay for the Stepper Motor speed in RPM.
rpm | The desired RPM, we will do our best to reach it! |
void Adafruit_StepperMotor::step | ( | uint16_t | steps, |
uint8_t | dir, | ||
uint8_t | style = SINGLE |
||
) |
Move the stepper motor with the given RPM speed, don't forget to call Adafruit_StepperMotor.setSpeed to set the speed!
steps | The number of steps we want to move |
dir | The direction to go, can be FORWARD or BACKWARD |
style | How to perform each step, can be SINGLE, DOUBLE, INTERLEAVE or MICROSTEP |
uint8_t Adafruit_StepperMotor::onestep | ( | uint8_t | dir, |
uint8_t | style | ||
) |
Move the stepper motor one step only, with no delays.
dir | The direction to go, can be FORWARD or BACKWARD |
style | How to perform each step, can be SINGLE, DOUBLE, INTERLEAVE or MICROSTEP |