    int start, end;
    uint8_t R, G, B;
   
-  if (0 == strncmp(FADE, messageBuffer.c_str(), strlen(FADE))) {
+  if (0 == strncmp(CYCLE, messageBuffer.c_str(), strlen(CYCLE))) {
+    boolean result = true;
+    char* next = strtok((char*) messageBuffer.c_str()," ");
+    next = strtok(nullptr," ");
+    int count = atoi(next);
+    if ((count < 2) || (count > MAX_CYCLE_LENGTH)) {
+       Serial.println("Invalid count for cycle");
+       return;
+    }
+
+    next = strtok(nullptr," ");
+    int duration = atoi(next);   
+        
+    CommandEntry* commands[count];
+    for (int i = 0; i < count; i++) {
+      commands[i] = new CommandEntry;
+      commands[i]->command = FADE_COMMAND;
+      commands[i]->duration = duration;
+    }
+        
+    if (extractRangeAndTarget(&commands[0]->range_start, 
+                              &commands[0]->range_end, 
+                              strip.numPixels(), 
+                              &commands[0]->R,
+                              &commands[0]->G,
+                              &commands[0]->B)) {
+      commands[0]->next_command = commands[1];   
+      for (int i = 1; i < count; i++) {
+        commands[i]->range_start = commands[0]->range_start;
+        commands[i]->range_end = commands[0]->range_end;
+        if (!extractTarget(&commands[i]->R,
+                           &commands[i]->G,
+                           &commands[i]->B)) {
+          result = false;
+          break;                    
+        }
+        if (i < (count - 1)) {
+          commands[i]->next_command = commands[i + 1];
+        } else {
+          commands[i]->next_command = commands[0];
+        }
+      }
+    } 
+
+    if (result) {
+      clearQueue();
+      enqueueCommand(commands[0]);
+      Serial.println("Cycle enqueued");
+    } else {
+      for (int i = 1; i < count; i++) {
+        if (commands[i] != nullptr) {
+          delete commands[i];  
+        }
+      }
+    }
+  } else if (0 == strncmp(FADE, messageBuffer.c_str(), strlen(FADE))) {
     CommandEntry* command = new CommandEntry;
-    if (extractRangeAndTarget(messageBuffer.c_str(), 
-                              &command->range_start, 
+    char* next = strtok((char*) messageBuffer.c_str()," ");
+    if (extractRangeAndTarget(&command->range_start, 
                               &command->range_end, 
                               strip.numPixels(), 
                               &command->R,
                               &command->G,
                               &command->B)) {
       command->command = FADE_COMMAND;
-      char* next = strtok(nullptr," ");
+      next = strtok(nullptr," ");
       command->duration = atoi(next);   
-      command->next_command = nullptr;                       
+      command->next_command = nullptr;
       enqueueCommand(command);
       Serial.println("Fade enqueued");
     } else {

  uint8_t G;
  uint8_t B;
  int duration;
  CommandEntry* next_command;
  CommandEntry* next_in_queue;
};

      setCurrent(0, 0, 0);
    }

    char* next = strtok((char*) messageBuffer.c_str()," ");
    if (extractRangeAndTarget(&start, &end, strip.numPixels(), &R, &G, &B)) {
      end = end + 1;
      for(uint16_t i = start; i < end; i++) {
        strip.setPixelColor(i, strip.Color(R, G, B));
