   CRGB color = selectColor(fabs(round(mag.magnetic.z * 100)));
 
   // Check for mode change commands
-  // CheckForNods(lsm);
+  CheckForGestures(accel);
 
   // apply a little frictional damping to keep things in control and prevent perpetual motion
   MomentumH *= friction;

}

// monitor orientation for mode-change 'gestures'
void CheckForNods(sensors_event_t event)
{
  if (accel.acceleration.x > nod)
  {
    if (millis() - nodStart > nodTime)
    {
      antiGravity = false;
      nodStart = millis(); // reset timer
      spinDown();
    }
  }
  else if (accel.acceleration.x < -(nod + 1))
  {
    if (millis() - nodStart > nodTime)
    {
      antiGravity = true;
      spinUp();
      nodStart = millis(); // reset timer
    }
  }
  else if (accel.acceleration.y > nod)
  {
    if (millis() - nodStart > nodTime)
    {
      mirroredEyes = false;
      spinDown();
      nodStart = millis(); // reset timer
    }
  }
  else if (accel.acceleration.y < -nod)
  {
    if (millis() - nodStart > nodTime)
    {
      mirroredEyes = true;
      spinUp();
      nodStart = millis(); // reset timer
    }
  }
  else     // no nods in progress
  {
    nodStart = millis(); // reset timer
  }
}


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

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