  * functions - one for each stepper.
  */
 class Stepper {
- public:
+ private:
+  bool update;
+  Command command;
+  int incr;
   int stepPin;
   int dirPin;
   int enablePin;
   int minPin;
   int maxPin;
-  bool update;
-  Command command;
-  int incr;
-
+
+ public:
   Stepper(int stepPinIn, int dirPinIn, int enablePinIn,
           int minPinIn, int maxPinIn) {
     stepPin = stepPinIn;

 * for helping me writing this function!
 */
bool parseGCode(String in) {
  int index = getIndex('X', in);
  if(index != -1) {
    sX.testSpin(true, index);
  } else
    return false;
}

String serialStr = "";

    command.pin = stepPin;
    command.times = amount;
  }

  void updateLoop() {
    if(update) {
      if(incr < command.times) {
        // Alternate
        dw(stepPin, HIGH);
        delay(1);
        dw(stepPin, LOW);

        // Add one to increment
        ++incr;
      } else {
        update = false;
        incr = 0;
      }
    }
  }
};


