   }
 }
 
-void exec_team() {
-  if (strlen(cmd) < strlen(cmd_team)) {
-    usage(cmd_team);
-    return;
-  }
-  int t = read_int(&cmd[5], 1);
-  if (t > 2) {
-    Serial.println("Invalid team number");
-    return;
-  }
-  int r = read_int(&cmd[7], 3);
-  int g = read_int(&cmd[11], 3);
-  int b = read_int(&cmd[15], 3);
-  team_colors[t] = Adafruit_NeoPixel::Color(r, g, b);
-}
-
-void exec_strip() {
-  if (strlen(cmd) < strlen(cmd_strip)) {
-    usage(cmd_strip);
-    return;
-  }
-  int strip = read_int(&cmd[6], 1);
-  if (strip > 3) {
-    Serial.println("Invalid strip number");
-    return;
-  }
-
-  byte led = 0;  
-
-  // Read the three "t 11" parts
-  for (byte i = 8; i < 19; i += 5) {
-    int team = read_int(&cmd[i], 1);
-    if (team > 3) {
-      Serial.println("Invalid team number");
+void exec_team(char * tok) {
+  // Read team number
+  char * arg = strtok_r(NULL, " ", &tok);
+  if (arg == NULL) {  
+    Serial.println("team number is required");
+    return;
+  }
+  int team = atoi(arg);
+  if (team > 2) {
+    Serial.println("team number is one of 0,1,2");
+    return;
+  }
+  // Read colors
+  arg = strtok_r(NULL, " ", &tok);
+  int r = atoi(arg);
+  arg = strtok_r(NULL, " ", &tok);
+  int g = atoi(arg);
+  arg = strtok_r(NULL, " ", &tok);
+  int b = atoi(arg);
+  team_colors[team] = Adafruit_NeoPixel::Color(r, g, b);
+}
+
+void exec_strip(char * tok) {
+  // Read strip number
+  char * arg = strtok_r(NULL, " ", &tok);
+  if (arg == NULL) {  
+    Serial.println("strip number is required");
+    return;
+  }
+  int strip = atoi(arg);
+  if (strip > 2) {
+    Serial.println("strip number is one of 0,1,2");
+    return;
+  }
+
+  byte led = 0;
+  // Read the three groups of "teamNumber ledCount"
+  for (byte i = 0; i < 3; i++) {
+    // Read the team
+    arg = strtok_r(NULL, " ", &tok);
+    if (arg == NULL) {  
+      Serial.println("team number is required");
       return;
     }
-    int team_leds = read_int(&cmd[i + 2], 2);
+    int team = atoi(arg);
+    if (team > 2) {
+      Serial.println("team number is one of 0,1,2");
+      return;
+    }
+
+    // Read the LED count
+    arg = strtok_r(NULL, " ", &tok);
+    if (arg == NULL) {  
+      Serial.println("led count is required");
+      return;
+    }
+    int team_leds = atoi(arg);
+
+    // Enable the LEDs
     for (byte l = 0; l < team_leds; l++) {
       strips[strip]->setPixelColor(led + l, team_colors[team]);
     }

  Serial.begin(115200);
  
  for (byte i = 0; i < 4; i++) {
    strips[i] = &Adafruit_NeoPixel(strip_leds[i], strip_pins[i], NEO_GRB + NEO_KHZ800);
    strips[i]->begin();
    strips[i]->show();
  }

  }
  strips[strip]->show();
}


