Libraries
\ Stepper
Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Name |
Stepper |
Examples |
#include "Stepper.h"
int steps = 100;
Stepper stepper(steps, 0, 1, 2, 3);
void setup()
{
stepper.setSpeed(20);
}
void loop()
{
stepper.step(20);
stepper.step(-20);
}
|
Description |
Class for controlling stepper motors connected to the Wiring hardware pins. The number of pins used depends on how the motor is wired to the Wiring hardware. |
Syntax |
Stepper mystepper(steps, pin1, pin2);
Stepper mystepper(steps, pin1, pin2, pin3, pin4);
|
Methods |
|
Parameters |
steps |
The number of steps in one revolution of the motor |
pin1, pin2, pin 3, pin 4 |
The pin numbers connected to the motor |
|
Returns |
None |
Usage |
Application |
Updated on July 07, 2011 11:11:50pm PDT