 // and I think it varies across different firmware versions.
 const int DOMEBAUDRATE = 2400;
 
-
-// I have a pin set to pull a relay high/low to trigger my upside down compressed air like R2's extinguisher
+// Default sound volume at startup
+// 0 = full volume, 255 off
+byte vol = 20;
+
+
+// Automation Delays
+// set automateDelay to min and max seconds between sounds
+byte automateDelay = random(5, 20); 
+//How much the dome may turn during automation.
+int turnDirection = 20;
+
+// Pin number to pull a relay high/low to trigger my upside down compressed air like R2's extinguisher
 #define EXTINGUISHERPIN 3
 
 #include <Sabertooth.h>


  mp3Trigger.setup();
  mp3Trigger.setVolume(vol);


  // Start I2C Bus. The body is the master.

  }


 
  // FOOT DRIVES
  // Xbox 360 analog stick values are signed 16 bit integer value
  // Sabertooth runs at 8 bit signed. -127 to 127 for speed (full speed reverse and  full speed forward)
  // Map the 360 stick values to our min/max current drive speed
  
  throttleStickValue = (map(Xbox.getAnalogHat(throttleAxis, 0), -32768, 32767, -drivespeed, drivespeed));
  if (throttleStickValue > -DRIVEDEADZONERANGE && throttleStickValue < DRIVEDEADZONERANGE) {
    // stick is in dead zone - don't drive
    driveThrottle = 0;
  } else {
    if (driveThrottle < throttleStickValue) {
      if (throttleStickValue - driveThrottle < (RAMPING + 1) ) {
        driveThrottle += RAMPING;
      } else {
        driveThrottle = throttleStickValue;
      }
    } else if (driveThrottle > throttleStickValue) {
      if (driveThrottle - throttleStickValue < (RAMPING + 1) ) {
        driveThrottle -= RAMPING;
      } else {
        driveThrottle = throttleStickValue;
      }
    }
  }
