       break;
     case PIXY_CONFIG:
       if (argv[0] == PIXY_INIT) {
-        pixyPtr = new Pixy();
-        pixyPtr->init();
+        if (pixyPtr == NULL) {
+          pixyPtr = new Pixy();
+          pixyPtr->init();
+        }
         // mark pins as Pixy so they are ignore in non Pixy data requests
         setPinModeCallback(PIN_PIXY_MOSI, PIXY);
         setPinModeCallback(PIN_PIXY_MISO, PIXY);

      enableInterrupt(encoderPin1, interruptFunctionLeft, RISING);
      enableInterrupt(encoderPin2, interruptFunctionRight, RISING);
    }
    if (pixyIsReporting) {
      numPixyBlocks = pixyPtr->getBlocks();
      // Only send Pixy data if a block was found.


void interruptFunctionRight() {
  interruptCountRight++;
}


/* Pixy Support */
Pixy* pixyPtr = NULL;
