ContentsIndex
Example
Stepper::step Method
 #include <Stepper.h>
  
 #define STEPS 100   // Set up by particular stepper motor.
  
 // The 4-pin stepper motor, connecting 4 pins.
 Stepper stepper(STEPS, 8, 9, 10, 11);
  
 int prev = 0;       // Reserve the previous value.
   
 void setup()
 {
   stepper.setSpeed(40);      // Sets up rotation speed to 40 RPMs.
 }
   
 void loop()
 {
   int value = analogRead(0); // Gets data from the sensor.
   stepper.step(value- prev); // The movement.
   prev = value;              // Records the previous displacement.
 }