     alternate(YELLOW, BLUE);
   }
   displayRed();
+  rotatingCogs(YELLOW, BLUE);
+  displayRed();
 }
 
+void rotatingCogs(CRGB colorOne, CRGB colorTwo) {
+  cogs(colorOne, colorTwo);
+  FastLED.show();
+  for (int i = 0; i < 10; i++) {
+    for (int c = 0; c < 4; c++) {
+      moveCogsUp();
+      delay(30);
+      FastLED.show();
+    }
+  }
+}
 
 void cylon(CRGB colorOne, CRGB colorTwo) {
   for(int i = 0; i < NUM_LEDS; i++) {


#define YELLOW CRGB(255, 90, 0)
#define BLUE CRGB(0, 50, 170)

// Define the array of leds
CRGB leds[NUM_LEDS];

  FastLED.show();
  delay(2000);
}

void cogs(CRGB colorOne, CRGB colorTwo) {
  for (int i = 0; i < NUM_LEDS; i++) {
    if ((i & COG_SIZE) == 0) { //Alternates every 4.
      leds[i] = colorOne;
    }
    else {
      leds[i] = colorTwo;
    }
  }
}

void moveCogsUp() {
  boolean changeColor = true;
  for (int i = 0; i < (COG_SIZE - 1); i++) {
    if (leds[i] != leds[i + 1]) {
      changeColor = false;
    }
  }
  if (changeColor) {
    shiftUp(leds[COG_SIZE]);
  }
  else {
    shiftUp(leds[0]);
  }
}

void moveCogsDown() {
  boolean changeColor = true;
  for (int i = (NUM_LEDS - 1); i > (NUM_LEDS - (COG_SIZE - 1)); i--) {
    if (leds[i] != leds[i - 1]) {
      changeColor = false;
    }
  }
  if (changeColor) {
    shiftDown(leds[COG_SIZE]);
  }
  else {
    shiftDown(leds[0]);
  }
}

//moves every led up one, and inserts colorIn at leds[0]
void shiftUp(CRGB colorIn) {
  for (int i = (NUM_LEDS - 1); i > 0; i--) {
    leds[i] = leds[i - 1]; //The last led becomes the previous led's color
  }
  leds[0] = colorIn;
}

//moves every led down one, and inserts colorIn at leds[(NUM_LEDS - 1)]
void shiftDown(CRGB colorIn) {
  for (int i = 0; i < (NUM_LEDS - 1); i++) { //Range: changes leds 0 - 78
    leds[i] = leds[i + 1]; //The first led becomes the next led's color
  }
  leds[(NUM_LEDS - 1)] = colorIn;
}
