 	while (!Serial) {
 	  ; 
 	}
-	Serial.println("Serial ready");
 }
 
 void setColor(int color[]) {
   analogWrite(REDPIN, color[0]);
   analogWrite(GREENPIN, color[1]);
   analogWrite(BLUEPIN, color[2]);  
-  currentColor[] = {color[0], color[1], color[2]};
+  setCurrentColor(color);
 }
 
 void fadeTo(int color[]) {
+	while(isArrayEquals(currentColor, color) == false) {
+		if(currentColor[0] > color[0]) {
+			currentColor[0]--;
+		} else if (currentColor[0] < color[0]) {
+			currentColor[0]++;
+		}
+		
+		if(currentColor[1] > color[1]) {
+			currentColor[1]--;
+		} else if (currentColor[1] < color[1]) {
+			currentColor[1]++;
+		}
+		
+		if(currentColor[2] > color[2]) {
+			currentColor[2]--;
+		} else if (currentColor[2] < color[2]) {
+			currentColor[2]++;
+		}
 
+		delay(5);
+		setColor(currentColor);
+	}
+}
+
+void setCurrentColor(int color[]) {
+	currentColor[0] = color[0];
+	currentColor[1] = color[1];
+	currentColor[2] = color[2];
+}
+
+bool isArrayEquals(int first[], int second[]) {
+	if(first[0] == second[0] && first[1] == second[1] && first[2] == second[2]) {
+		return true;
+	}
+	return false;
 }
	if(bombStatus == "planted") {
	}
	Serial.println(bombStatus); */
	setColor(deadColor);
}

void initSerial() {

#define BUFFER_SIZE 500
#define BAUD_RATE 9600

int terroColor[3] = {245, 179, 83};
int counterColor[3] = {20, 36, 214};
int deadColor[3] = {171, 3, 142};
int bombColor[3] = {255, 0, 0};
int currentColor[3] = {0, 0, 0};

void setup() {
	initSerial();
	pinMode(REDPIN, OUTPUT);
	pinMode(GREENPIN, OUTPUT);
	pinMode(BLUEPIN, OUTPUT);

	setColor(deadColor);
}

void loop() {
