#include <FastLED.h>

#define NUM_LEDS 64         // количетсво диодов в ленте
#define LEDS_PIN 2          // пин подключения диодной ленты

CRGB leds[NUM_LEDS];        // массив ленты

int brightness = 84;
int potBrightness = 0;
int speed = 50;
int potSpeed = 0;
int effect = 1;

int ihue = 0;
int thissat = 255; 


void setup(){
  FastLED.addLeds<WS2812, LEDS_PIN, RGB>(leds, NUM_LEDS);
  FastLED.setBrightness(brightness);
  Serial.begin(9600);
}

void rainbow_fade() {                         //-m2-FADE ALL LEDS THROUGH HSV RAINBOW
  ihue++;
  if (ihue > 255) {
    ihue = 0;
  }
  for (int idex = 0 ; idex < NUM_LEDS; idex++ ) {
    leds[idex] = CHSV(ihue, thissat, 255);
  }
  LEDS.show();
//  if (safeDelay(thisdelay)) return;
}

void loop(){/*
  for (int ihue = 0; ihue <= 255; ihue++){
    for (int ledcounter = 0; ledcounter < NUM_LEDS; ledcounter++){
      leds[ledcounter] = CHSV(ihue, 255, 255);
    }
    LEDS.show();
    Serial.println(ihue);
    delay(50);
  }
*/
  for (int currentled = 0; currentled < NUM_LEDS; currentled++){
    leds[currentled] = CHSV(0, 0, 255);
    LEDS.show();
    delay(50);
  }
}