 {
     long range = GetUltrasoundRange();
 
-    Serial.print("Result: ");
-    Serial.println(range);
+    int motorSpeed = 1 * 255;
+    uint32_t color = LEDStrip.Color(0, 255, 0);
+    if(range < rangeLimit_Warning1) { motorSpeed = 0.6 * 255; color = LEDStrip.Color(127, 255, 0);}
+    if(range < rangeLimit_Warning2) { motorSpeed = 0.5 * 255; color = LEDStrip.Color(255, 255, 0); }
+    if(range < rangeLimit_Warning3) { motorSpeed = 0.4 * 255; color = LEDStrip.Color(255, 127, 0); }
+    if(range < rangeLimit) { color = LEDStrip.Color(255, 0, 0); }
 
-    int motorSpeed = 1 * 255;
-    if(range < 100) { motorSpeed = 0.6 * 255; }
-    if(range < 60) { motorSpeed = 0.5 * 255; }
-    if(range < 40) { motorSpeed = 0.4 * 255; }
+    colorSet(color);
 
     // obstacle is further away than X cm
     if(spinCompleted && range > 0 && range > rangeLimit)


    Serial.begin(9600); // Starts the serial communication

    strip.begin();
    strip.show(); // Initialize all pixels to 'off'
}



        SetMotor(motorPin1_1, motorPin1_2, -motorSpeed);
        SetMotor(motorPin2_1, motorPin2_2, motorSpeed);

        if(range > (rangeLimit * 2))
        {
            spinCompleted = true;
