FastLED 3.9.15
Loading...
Searching...
No Matches

◆ setup()

void setup ( )

Definition at line 167 of file Esp32S3I2SDemo.ino.

167 {
168 psramInit(); // IMPORTANT: This is required to enable PSRAM. If you don't do this, the driver will not work.
169 // put your setup code here, to run once:
170 Serial.begin(115200);
171
172 // This is used so that you can see if PSRAM is enabled. If not, we will crash in setup() or in loop().
173 log_d("Total heap: %d", ESP.getHeapSize());
174 log_d("Free heap: %d", ESP.getFreeHeap());
175 log_d("Total PSRAM: %d", ESP.getPsramSize()); // If this prints out 0, then PSRAM is not enabled.
176 log_d("Free PSRAM: %d", ESP.getFreePsram());
177
178 log_d("waiting 6 second before startup");
179 delay(6000); // The long reset time here is to make it easier to flash the device during the development process.
180 if (gUseFastLEDApi) {
182 } else {
183 driver = fl::InternalI2SDriver::create();
184 driver->initled((uint8_t *)leds, PINS, NUMSTRIPS, NUM_LEDS_PER_STRIP); // Skips extra frame buffer copy.
185 driver->setBrightness(32);
186 }
187}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS_PER_STRIP
fl::InternalI2SDriver * driver
void setup_i2s_using_fastled_api()
const bool gUseFastLEDApi
#define NUMSTRIPS
int PINS[]

References driver, gUseFastLEDApi, leds, NUM_LEDS_PER_STRIP, NUMSTRIPS, PINS, and setup_i2s_using_fastled_api().

+ Here is the call graph for this function: