     
     for (int i = 0; i < 3; i++) {
       token = strtok(NULL, " ");
+      
+      if (strcmp(token, "state") == 0) {
+        getRGBColor();
+        return;
+      }  
+      
       rgb[i] = atoi(token);
     }
     

#include "DHT.h"

#define DHTPIN A2
#define DHTTYPE DHT11
#define COMMON_ANODE

int redPin = 9;
int greenPin = 10;
int bluePin = 11;

DHT dht(DHTPIN, DHTTYPE);

char stringBuffer[500];


void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
