switch (inByte) {
case ':':
commandString [input_pos] = '\0'; // terminating null byte
input_pos = 0;
parse_the_string ++;
break;
default:
if (input_pos < (MAX_INPUT - 1))
commandString [input_pos++] = inByte;
break;
}
A switch statement is appropriate when you have more than 2 cases.
static char commandString [MAX_INPUT];
static char red [MAX_INPUT];
static char green [MAX_INPUT];
static char blue [MAX_INPUT];
This set of arrays does not mesh with you sending "45".