 
 
 void setup()
-{  
+{
+    Wire.begin();  
     myserv.attach(SERV1PIN); 
     myserv.write(servoPosition);
     

    // first character sent switches us into LOADED mode
    // 97="a", 98="b", 99="c", 100="d", 120="x"
    if (Serial.available() > 0) {        
      inputString = String(Serial.read());
      if (!LOADED) {
        LOADED = true;
        stepperLift.setCurrentPosition(0);
        UPDATE = true;
      }        
      Serial.println("Rx: " + inputString);
      if (inputString == "97") {              // 'a' hover over input stack
        stepperArm.moveTo(hoverArmPos);
        stepperLift.moveTo(stepperLift.currentPosition() - 20);          
      }
      else if (inputString == "98") {        // 'b' ID'd pile
        stepperArm.moveTo(firstArmPos);
        destinationArmPos = firstArmPos;
      }
      else if (inputString == "99") {        // 'c' unidentified pile
        stepperArm.moveTo(secondArmPos);
        destinationArmPos = secondArmPos;
      }
      else if (inputString == "100") {       // 'd' Reset into loading mode until another character sent
        stepperArm.moveTo(firstArmPos);
        destinationArmPos = firstArmPos;
        LOADED = false;
      }
      else if (inputString == "120") {
        DEBUG = !DEBUG;
        Serial.println("DEBUG <x> is: " + String(DEBUG));
      }
      inputString = "";
    }    

#include <AccelStepper.h>
#include <Servo.h>
#include <Wire.h>

// #defines are macros for faster pin access than built-in digitalWrite().
//  *http://masteringarduino.blogspot.com/2013/10/fastest-and-smallest-digitalread-and.html
