 const float friction = 0.985; // frictional damping constant.  1.0 is no friction.
 const float swing = 20;  // arbitrary divisor for gravitational force
 const float gravity = 100;  // arbitrary divisor for lateral acceleration
-const float nod = 7.5; // accelerometer threshold for toggling modes
-
-long nodStart = 0;
-long nodTime = 2000;
+const float gestureThreshold = -0.80; // accelerometer threshold for toggling modes
+
+long gestureStart = 0;
+long gestureHoldTime = 3000;
 
 bool antiGravity = true;  // The pendulum will anti-gravitate to the top.
 bool mirroredEyes = false; // The left eye will mirror the right.
 
-const float halfWidth = 2; // half-width of pupil (in pixels)
+const float pupilRadius = 2; // half-width of pupil (in pixels)
 
 // Pi for calculations - not the raspberry type
 const float Pi = 3.14159;

  while (round(pos) < 0) pos += NUM_LEDS;
  while (round(pos) > NUM_LEDS - 1) pos -= NUM_LEDS;

  int lightOn[round(halfWidth * 2 + 1)];
  int lightIndex = 0;
  for(int i = pos; i > pos - halfWidth; i--)
  {
    lightOn[lightIndex] = wrapAround(i);
    lightIndex++;
  }
  for(int i = pos; i < pos + halfWidth; i++)
  {
    lightOn[lightIndex] = wrapAround(i);
    lightIndex++;

  FastLED.addLeds<APA102, DATAPIN_RIGHT, CLOCKPIN_RIGHT>(rightLense, NUM_LEDS);

  // Try to initialise
  if (!lsm.begin())
  {
    while (1);
  }
  setupSensor();
  resetModes();
}

int test = 0;
// main processing loop
void loop(void)
{
