   }
   
   if (readString.length() > 0) {
-    char carray[readString.length() + 1];
-    readString.toCharArray(carray, sizeof(carray));
-    int ledIndex = atoi(carray); 
+    int ledIndex = stringToInt(readString);
     if (ledIndex < LEDS_COUNT) {
       matrix[ledIndex] = true;
     }

const int LEDS_SIDE = 12;
const char LED_SEPARATOR = ',';
const char START = '/';
const char END = '!';

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(LEDS_COUNT, PIXELS_DATA_PIN, NEO_GRB + NEO_KHZ800);
uint32_t colorOn = pixels.Color(0, 255,255);
uint32_t colorOff = pixels.Color(0,0,0);

String readString;
char c;
boolean matrix[LEDS_COUNT];

void setup() {
  pixels.begin();

      reset();
      break;
    } 
    if (c == RED) {
      if (readString.length() > 0) {
        r = stringToInt(readString);
        readString="";
      }
      break;
    }
    if (c == GREEN) {
      if (readString.length() > 0) {
        g = stringToInt(readString);
        readString="";
      }
      break;
    }
    if (c == BLUE) {
      if (readString.length() > 0) {
        b = stringToInt(readString);
        readString="";
      }
      break;
    } 
    if (c == END) {
      break;
    }  
