//
//  "Basic Push Button Hookup"
//  Check dev board, pins, upload speed, etc..
//  Button used here is a 2-pins, tactical, push-to-break button
//  You can watch the button in action via the serial monitor

#include <FastLED.h>

#define LED_PIN     32
#define BTN_PIN     26
#define COLOR_ORDER GRB
#define CHIPSET     WS2811
#define NUM_LEDS    10
#define BRIGHTNESS  50

CRGB leds[NUM_LEDS]; //new array representing the number of leds we've enabled
//bool pressed = false;


void setup() {
  delay(3000); // sanity delay
  Serial.begin(115200);
  pinMode(BTN_PIN, INPUT_PULLUP);
  FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
//  FastLED.setBrightness( BRIGHTNESS );
  FastLED.setMaxPowerInVoltsAndMilliamps( 3.3, 500);

}

void loop() {
  //  digitalWrite(BTN_PIN, HIGH);
   
     if (digitalRead(BTN_PIN) == 0) {
       fill_solid(leds, NUM_LEDS, CRGB::Black);
        Serial.print(digitalRead(BTN_PIN));
     } else {
       fill_solid(leds, NUM_LEDS, CRGB::Green);
        Serial.print(digitalRead(BTN_PIN));
     };
     
   FastLED.show();
   delay(100);
}
esp:VIN
esp:GND.2
esp:D13
esp:D12
esp:D14
esp:D27
esp:D26
esp:D25
esp:D33
esp:D32
esp:D35
esp:D34
esp:VN
esp:VP
esp:EN
esp:3V3
esp:GND.1
esp:D15
esp:D2
esp:D4
esp:RX2
esp:TX2
esp:D5
esp:D18
esp:D19
esp:D21
esp:RX0
esp:TX0
esp:D22
esp:D23
neopixels1:DOUT
neopixels1:VDD
neopixels1:VSS
neopixels1:DIN
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r