Package jpigpio.devices
Class Stepper
java.lang.Object
jpigpio.devices.Stepper
public class Stepper
extends java.lang.Object
Control a stepper motor
-
Constructor Details
-
Stepper
public Stepper(JPigpio pigpio, int blueGpio, int pinkGpio, int yellowGpio, int orangeGpio) throws PigpioExceptionCreate an instance of the Stepper object used to control the stepper motor.- Parameters:
pigpio
- The pigpio controllerblueGpio
- The blue gpio pin (IN1)pinkGpio
- The pink gpio pin (IN2)yellowGpio
- The yellow gpio pin (IN3)orangeGpio
- The orange gpio pin (IN4)- Throws:
PigpioException
-
-
Method Details
-
forward
Move the stepper forward one step.- Throws:
PigpioException
-
backward
Move the stepper backwards one step.- Throws:
PigpioException
-