 	if(bombStatus == "planted") {
 	}
 	Serial.println(bombStatus); */
-	setColor(deadColor);
+	
+	fadeTo(bombColor);
+	fadeTo(terroColor);
 }
 
 void initSerial() {

#define BUFFER_SIZE 500
#define BAUD_RATE 9600

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

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

void loop() {

	while (!Serial) {
	  ; 
	}
}

void setColor(int color[]) {
  analogWrite(REDPIN, color[0]);
  analogWrite(GREENPIN, color[1]);
  analogWrite(BLUEPIN, 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;
}