FastLED 3.9.15
Loading...
Searching...
No Matches
FxPacifica.ino

This sketch is fully compatible with the FastLED web compiler.

This sketch is fully compatible with the FastLED web compiler. To use it do the following:

  1. Install Fastled: pip install fastled
  2. cd into this examples page.
  3. Run the FastLED web compiler at root: fastled
  4. When the compiler is done a web page will open.
//
// "Pacifica"
// Gentle, blue-green ocean waves.
// December 2019, Mark Kriegsman and Mary Corey March.
// For Dan.
//
#define FASTLED_ALLOW_INTERRUPTS 0
#include <FastLED.h>
#include "fx/1d/pacifica.h"
#include "fl/screenmap.h"
#include "defs.h" // for ENABLE_SKETCH
#if !ENABLE_SKETCH
void setup() {}
void loop() {}
#else
using namespace fl;
#define DATA_PIN 3
#define NUM_LEDS 60
#define MAX_POWER_MILLIAMPS 500
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
Pacifica pacifica(NUM_LEDS);
void setup() {
Serial.begin(115200);
.setCorrection(TypicalLEDStrip)
.setScreenMap(screenMap);
FastLED.setMaxPowerInVoltsAndMilliamps(5, MAX_POWER_MILLIAMPS);
}
void loop() {
pacifica.draw(Fx::DrawContext(millis(), leds));
FastLED.show();
}
}
#endif // ENABLE_SKETCH
CRGB leds[NUM_LEDS]
#define NUM_LEDS
void setup()
#define DATA_PIN
void loop()
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
central include file for FastLED, defines the CFastLED class/object
#define MAX_POWER_MILLIAMPS
Definition Pacifica.ino:18
#define COLOR_ORDER
Definition advanced.h:42
#define LED_TYPE
Definition advanced.h:41
_DrawContext DrawContext
Definition fx.h:21
static ScreenMap DefaultStrip(int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.2f, float completion=.9f)
Definition screenmap.h:40
fl::ScreenMap screenMap
Definition Corkscrew.h:103
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
Definition lib8tion.h:1221
IMPORTANT!
Definition crgb.h:20
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86