#include <LEDFader.h>

/*
  Fades a single LED up and down using LED Fader.
  Connect an LED to pin 3
*/

//#define LED_PIN 3

#define FADE_TIME 2000
#define FADE_TIME1 3000

#define DIR_UP 1
#define DIR_DOWN -1

LEDFader led;
LEDFader led1;
int direction = DIR_UP;

void setup() {
  led = LEDFader(3);
  led1 = LEDFader(4);
  led.fade(255, FADE_TIME);
  led1.fade(255, FADE_TIME);
}

void loop() {
  led.update();
  led1.update();

  // LED no longer fading, switch direction
  if (!led.is_fading()) {

    // Fade down
    if (direction == DIR_UP) {
      led.fade(0, FADE_TIME);
      direction = DIR_DOWN;
    }
    // Fade up
    else {
      led.fade(255, FADE_TIME);
      direction = DIR_UP;
    }
  }

  // LED no longer fading, switch direction
  if (!led1.is_fading()) {

    // Fade down
    if (direction == DIR_UP) {
      led1.fade(0, FADE_TIME1);
      direction = DIR_DOWN;
    }
    // Fade up
    else {
      led1.fade(255, FADE_TIME1);
      direction = DIR_UP;
    }
  }
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
led6:A
led6:C
led1:A
led1:C