         leftLense[i] = ColorFromPalette(palette, hue + (i * 2), beat - hue + (i * 8));
     }
     FastLED.show();
-    EVERY_N_MILLISECONDS( 20 ) { hue++; } // slowly cycle the "base color" through the rainbow
-}
-
-void sinelon()
-{
-    // a colored dot sweeping back and forth, with fading trails
-    fadeToBlackBy( rightLense, NUM_LEDS, 20);
-    fadeToBlackBy( leftLense, NUM_LEDS, 20);
-    int pos = beatsin16(13,0,NUM_LEDS);
-    rightLense[pos] += CHSV( hue, 200, 192);
-    leftLense[pos] += CHSV( hue, 200, 192);
-
-    FastLED.show();
-    EVERY_N_MILLISECONDS( 20 ) { hue++; } // slowly cycle the "base color" through the rainbow
+    EVERY_N_MILLISECONDS(20)
+    { hue++; } // slowly cycle the "base color" through the rainbow
+}
+
+// a colored dot sweeping back and forth, with fading trails
+void sinelon() {
+    fadeToBlackBy(rightLense, NUM_LEDS, 20);
+    fadeToBlackBy(leftLense, NUM_LEDS, 20);
+    int pos = beatsin16(13, 0, NUM_LEDS);
+    rightLense[pos] += CHSV(hue, 200, 192);
+    leftLense[pos] += CHSV(hue, 200, 192);
+
+    FastLED.show();
+    EVERY_N_MILLISECONDS(20)
+    { hue++; } // slowly cycle the "base color" through the rainbow
 }
 
 
 void juggle() {
     // eight colored dots, weaving in and out of sync with each other
-    fadeToBlackBy( rightLense, NUM_LEDS, 20);
-    fadeToBlackBy( leftLense, NUM_LEDS, 20);
+    fadeToBlackBy(rightLense, NUM_LEDS, 20);
+    fadeToBlackBy(leftLense, NUM_LEDS, 20);
     byte dothue = 0;
-    for( int i = 0; i < 8; i++) {
-        rightLense[beatsin16(i+7,0,NUM_LEDS)] |= CHSV(dothue, 200, 180);
-        leftLense[beatsin16(i+7,0,NUM_LEDS)] |= CHSV(dothue, 200, 180);
+    for (int i = 0; i < 8; i++) {
+        rightLense[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 180);
+        leftLense[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 180);
         dothue += 32;
     }
 
     FastLED.show();
-    EVERY_N_MILLISECONDS( 20 ) { hue++; } // slowly cycle the "base color" through the rainbow
+    EVERY_N_MILLISECONDS(20)
+    { hue++; } // slowly cycle the "base color" through the rainbow
 }
 
 void pendulum() {

const float pupilRadius = 2; // half-width of pupil (in pixels)

long gestureStart = 0;
long gestureHoldTime = 1500;

uint8_t hue = 0;
uint8_t currentPatternNumber = 0; // Index number of which pattern is current


// List of patterns to cycle through.  Each is defined as a separate function below.
typedef void (*SimplePattern)();

typedef void (*Action)();

void checkForGestures(sensors_event_t accel) {
    if (accel.acceleration.x < gestureThreshold) {
        if (millis() - gestureStart > gestureHoldTime) {
            gestureStart = millis();
            activateGestureModeSelect();
        }
    }
    else {
        gestureStart = millis();
    }
}

