  * @param Integer level number of leds to light up from 0 to 5
  */
 void setLedLevel(int level) {
-
 	int ledR = 0,
 		ledG = 0,
 		ledB = 0;
 
 	// turn off LED if level is zero
 	if (level == 0) {
-		FastLED.setBrightness(BRIGHTNESS_OFF);
+		FastLED.setBrightness(LED_BRIGHTNESS_OFF);
 	} else {
-		if (brightnessValue > BRIGHTNESS_THRESHOLD)
-			FastLED.setBrightness(BRIGHTNESS_MAX);
-		else FastLED.setBrightness(BRIGHTNESS_MIN);
+		level = map(level, LED_LEVEL_MIN, LED_LEVEL_MAX, 0, 255);
+		FastLED.setBrightness(ledBrightness);
 	}
 
-	// reverse LED level so red is shown when the soil is dry and green when moist
-	level = map(constrain(level, 0, MAX_LED_VALUE), 0, 255, 255, 0);
-
 	// this changes the led color from red to yellow to green
-	ledR = constrain(2 * level, 0, 255);
-	ledG = constrain(2 * (255 - level), 0, 255);
+	ledR = 255 - level;
+	ledG = level;
 
 	// set led color and show it to the world
 	smartLed[0].setRGB(ledR, ledG, ledB);


	return constrain(average, min, max);
}


 * @return Integer
 */
int readSensor(int sensorPin, int min, int max) {
	int sensorMoistureValue, average;
	float sum;
	for (int i = 0; i < 50; i++) {
		sensorMoistureValue = analogRead(sensorPin);
		sum += sensorMoistureValue;
		delay(1);
	}

