#include <FastLED.h>
#define NUM_LEDS 8
#define DATA_PIN 21

#define touch_pad_A  32
#define touch_pad_B  33
#define touch_pad_C  27
#define touch_pad_D  14
#define touch_threshold  35

CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
  if(touchRead(touch_pad_A) < touch_threshold ){
    LED_Blink(0);
  }
   if(touchRead(touch_pad_B) < touch_threshold ){
    LED_Blink(2);
  }
  if(touchRead(touch_pad_C) < touch_threshold ){
    LED_Blink(5);
  }
  if(touchRead(touch_pad_D) < touch_threshold ){
    LED_Blink(7);
  }
}

void LED_Blink(int i) { 
  leds[i] = CRGB::Blue;
  FastLED.show();
  delay(250);
  leds[i] = CRGB::Black;
  FastLED.show();
}

