#include <FastLED.h>
#define LED_PIN18 7
#define LED_PIN19 8
#define LED_PIN21 12
#define LED_PIN22 13
#define COLOR_ORDER GRB // If colours look wrong, play with this
#define CHIPSET WS2812B
int const NUM_LEDS=30;
CRGB leds18[NUM_LEDS];
CRGB leds19[NUM_LEDS];
CRGB leds21[NUM_LEDS];
CRGB leds22[NUM_LEDS];
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
FastLED.addLeds<WS2812, LED_PIN18, GRB>(leds18, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN19, GRB>(leds19, NUM_LEDS);
FastLED.addLeds<WS2812, LED_PIN21, GRB>(leds21, NUM_LEDS);
//FastLED.addLeds<WS2812, LED_PIN22, GRB>(leds22, NUM_LEDS);
delay(2000);
FastLED.clear();
FastLED.show();
}
void loop() {
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
Serial.println("ON");
for(int i=0; i<NUM_LEDS;i++){
leds18[i]=CHSV(0,255,255);
leds19[i]=CHSV(42,255,255);
leds21[i]=CHSV(84,255,255);
// leds18[i]=CHSV(62,255,255);
FastLED.show();
}
delay(100);
Serial.println("OFF");
for(int j=0; j<NUM_LEDS;j++){
leds18[j]=CHSV(62,255,255);
leds19[j]=CHSV(0,0,0);
leds21[j]=CHSV(0,0,0);
// leds15[j]=CHSV(0,0,0);
FastLED.show();
}
}