PWM Pins, Four fading LEDs and two servos

Hello: First, I hope I have the correct forum. I'm using a Nano. I would like to fade 4 LEDs * and *use two servos on pins 3,5,6,9 and 10, 11. The fade on pin 9 or 10 or 11 will not work unless I comment out all servo references in the code. I just read in another forum that the Servo library disables analogWrite on 9 and 10, but I can't get 11 to work either. So, is there any way around this? Code below, if it helps.

[code]
// Steambox Sketch


#define INTERVAL_1 0
//#include<Servo.h>

unsigned long time_1 = 0;
int count = 0;
//int gearservo = 10;


//Servo Servogear;
//Servo Servolock;

int pos = 0;
const int LED_Y = 2;    //digital pins
const int RGB_R = 4;
const int RGB_G = 7;
const int RGB_B = 8;
const int LED_W = A3;   //Used as a digital pin
int LED_B1 = 3;        //PWM for fading LEDS
int LED_B2 = 5;
int LED_B3 = 6;
int LED_B4 = 9;

const int LED_E = 12;   //Emerald LED
const int Button = 13; //button pin
int LEDS = 0;
int buttonState = 0;

void setup() {


  pinMode(LED_Y, OUTPUT);
  pinMode(RGB_R, OUTPUT);
  pinMode(RGB_B, OUTPUT);
  pinMode(RGB_G, OUTPUT);
  pinMode(LED_W, OUTPUT);
  pinMode(LED_B1, OUTPUT );
  pinMode(LED_B2, OUTPUT  );
  pinMode(LED_B3, OUTPUT );
  pinMode(LED_B4, OUTPUT );
  pinMode(LED_E, OUTPUT);
  pinMode(Button, INPUT);

  //Servogear.attach(10);
 /// Servolock.attach(11);

  //Servolock.write(90);
}

void loop() {


  switch (LEDS) {

    //___________ Yellow LED blink______________________________________

    case 0:

      for (int y = 0; y <= 3; y++) {    //blink 3 times
        digitalWrite (LED_Y, HIGH);
        delay(150);
        digitalWrite (LED_Y, LOW);
        delay(150);
      }

      digitalWrite(LED_Y, HIGH);     //stay high for 1.5 seconds
      delay(1500);
      digitalWrite(LED_Y, LOW);
      delay (100);

    case 1:

      //_----------------RBG Tube----------------------------------
      digitalWrite(RGB_R, HIGH);   //RGB TUBE   Cycle through red, blue, green
      delay(1000);
      digitalWrite(RGB_R, LOW);
      digitalWrite(RGB_G, HIGH);
      delay(1000);
      digitalWrite(RGB_G, LOW);
      digitalWrite(RGB_B, HIGH);
      delay(1000);
      digitalWrite(RGB_B, LOW);

      //-------------White Blink ON------------------------------

      for (int w = 0; w <= 2; w++) {  //Whte blink quickly twicw
        digitalWrite (LED_W, HIGH);
        delay(100);
        digitalWrite (LED_W, LOW);
        delay(100);
      }
      digitalWrite(LED_W, HIGH);    // stay on 1.5 seconds
      delay(1500);
      digitalWrite(LED_W, LOW);

    case 2:   //Blue 1 to 2
      //-----------Blue 1 to 2 -----One-----------------

      if (millis() >= time_1 + INTERVAL_1) {              //LED 1 fade in and out
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B1, fadeValue);  //fading up to 255

        delay(25);
      }
      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 3) {  //Stay on at very low brightness
        analogWrite(LED_B1, fadeValue);

        delay(25);
      }


      if (millis() >= time_1 + INTERVAL_1) {                  //LED 2 fede in and out
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B2, fadeValue);  //fading up to 255

        delay(25);
      }

      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 3) {
        analogWrite(LED_B2, fadeValue);

        delay(25);
      }
      analogWrite(LED_B1, LOW);   //B1 turn completely off

    case 3:     //  blue 2 to 3

      //---------------------2 to 3 -----------------------------

      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B2, fadeValue);  //fading up to 255

        delay(25);
      }
      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 5) {
        analogWrite(LED_B2, fadeValue);

        delay(25);
      }


      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B3, fadeValue);  //fading up to 255

        delay(25);
      }

      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 5) {
        analogWrite(LED_B3, fadeValue);

        delay(25);
      }
      analogWrite(LED_B2, LOW);   //B1 off
      delay(1000);
      digitalWrite(LED_B3, LOW);

    case 4:
      //----------------Emerald------------------------

      digitalWrite(LED_E, HIGH);
      delay( 4000);
      digitalWrite(LED_E, LOW);
    case 5:
      //------------------3 to 2-------------------------
      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B3, fadeValue);  //fading up to 255

        delay(25);
      }
      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 3) {
        analogWrite(LED_B3, fadeValue);
      }

      delay(25);


      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B2, fadeValue);  //fading up to 255

        delay(25);
      }

      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 3) {
        analogWrite(LED_B2, fadeValue);

        delay(25);
      }
      analogWrite(LED_B3, LOW);   //B1 off

    //-----------------2 to 4-------------------------
    case 6:
      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B2, fadeValue);  //fading up to 255

        delay(25);
      }
      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 5) {
        analogWrite(LED_B2, fadeValue);

        delay(25);
      }

      if (millis() >= time_1 + INTERVAL_1) {
        time_1 += INTERVAL_1;
      }
      for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {

        analogWrite(LED_B4, fadeValue);  //fading up to 255

        delay(25);
      }
      for (int fadeValue = 255 ; fadeValue >= 5; fadeValue -= 5) {
        analogWrite(LED_B4, fadeValue);

        delay(25);
      }
    case 7:
    analogWrite(LED_B4, LOW);
    digitalWrite(LED_W, HIGH);
         delay (2000);
    digitalWrite(LED_W,LOW);
  }
}

[/code]

Servos don't have to be on PWM pins.

It hurts to see so many delays.
A delay() stops everything until the delay time has passed.
Learn to code with millis() timing.
See the BlinkWithoutDelay example in the IDE.

I see you don't use the button on pin13, but be careful if you do.
A Nano has an un-buffered LED on that pin that could upset your button function.
Must have the button between 5volt and pin with a pull down resistor for it to work.
Leo..

On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins.
See the detail in note and warning part of servo library reference

For pin 11, since you used it for servo, you can not use it for fade LED.

And more, see:

As is described in the Servo library manual, when using this library you lose PWM functionality on pins 9 and 10 (this as the library uses Timer1). Any pin (except A6 and A7 which are analog in only) can be used for a servo.

wvmarle:
As is described in the Servo library manual, when using this library you lose PWM functionality on pins 9 and 10 (this as the library uses Timer1). Any pin (except A6 and A7 which are analog in only) can be used for a servo.

Thank you very very much!