#include "FastLED.h"
#define PIN 2 // The pin connected to DATA line to control the LEDs
#define NUM_LEDS 300 // Enter the total number of LEDs on the strip
CRGB leds[NUM_LEDS];
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Hello, ESP32!");
FastLED.addLeds<WS2812B, PIN, GRB>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setMaxPowerInVoltsAndMilliamps(5, 4500); // Set power limit of LED strip to 5V, 1500mA
FastLED.setBrightness(50);
FastLED.clear();
FastLED.show();
}
void loop() {
uint8_t thisSpeed = 10;
uint8_t deltaHue= 10;
uint8_t thisHue = beat8(thisSpeed,255);
fill_rainbow(leds, NUM_LEDS, thisHue, deltaHue);
FastLED.show();
delay(10); // this speeds up the simulation
}