FastLED 3.9.15
Loading...
Searching...
No Matches
FxPacifica.ino
Go to the documentation of this file.
1
10
11//
12// "Pacifica"
13// Gentle, blue-green ocean waves.
14// December 2019, Mark Kriegsman and Mary Corey March.
15// For Dan.
16//
17
18
19#define FASTLED_ALLOW_INTERRUPTS 0
20#include <FastLED.h>
21#include "fx/1d/pacifica.h"
22#include "fl/screenmap.h"
23#include "defs.h" // for ENABLE_SKETCH
24
25#if !ENABLE_SKETCH
26void setup() {}
27void loop() {}
28#else
29
30
31using namespace fl;
32
33#define DATA_PIN 3
34#define NUM_LEDS 60
35#define MAX_POWER_MILLIAMPS 500
36#define LED_TYPE WS2812B
37#define COLOR_ORDER GRB
38
40Pacifica pacifica(NUM_LEDS);
41
42void setup() {
43 Serial.begin(115200);
46 .setCorrection(TypicalLEDStrip)
47 .setScreenMap(screenMap);
48 FastLED.setMaxPowerInVoltsAndMilliamps(5, MAX_POWER_MILLIAMPS);
49}
50
51void loop() {
53 pacifica.draw(Fx::DrawContext(millis(), leds));
54 FastLED.show();
55 }
56}
57
58#endif // ENABLE_SKETCH
CRGB leds[NUM_LEDS]
#define NUM_LEDS
#define DATA_PIN
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
void setup()
void loop()
#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