# include <SoftPWM.h>

// LED muj potok

const int lowestPin = 2;      
const int highestPin = 9;
int a = 0;
int b = 0;
int c = 0;
int thisPin = 0;     

void setup()
{
  SoftPWMBegin();

  for(int thisPin = lowestPin;thisPin <= highestPin;thisPin++)
    SoftPWMSet(thisPin, 0);

  SoftPWMSetFadeTime(ALL, 0, 0);
}

void loop() {
  
  for (thisPin = lowestPin;thisPin <= highestPin;thisPin++) {

    a=thisPin;
    ;
    switch (a) {
      case 2: 
      b = highestPin;
      c = highestPin-1;
      break;
      
      case 3:
      c = highestPin;
      b = lowestPin;
      break;
      
      default:
      b = a-1;
      c = a-2;
      break;
     }

/*    analogWrite(a,255);
    analogWrite(b,130);
    analogWrite(c,80);
*/
    SoftPWMSet(a, 255);
    SoftPWMSet(b, 100);
    SoftPWMSet(c, 30);

    // zapnout tuto LEDku 
    delay(125);
/*    
    analogWrite(a,0);
    analogWrite(b,0);
    analogWrite(c,0);
*/
    SoftPWMSet(a, 0);
    SoftPWMSet(b, 0);
    SoftPWMSet(c, 0);
  }
}