FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FxPacifica.ino
Go to the documentation of this file.
1
4
5//
6// "Pacifica"
7// Gentle, blue-green ocean waves.
8// December 2019, Mark Kriegsman and Mary Corey March.
9// For Dan.
10//
11
12
13#define FASTLED_ALLOW_INTERRUPTS 0
14#include <FastLED.h>
15#include "fx/1d/pacifica.h"
16#include "fl/screenmap.h"
17#include "defs.h" // for ENABLE_SKETCH
18
19#if !ENABLE_SKETCH
20void setup() {}
21void loop() {}
22#else
23
24
25using namespace fl;
26
27#define DATA_PIN 3
28#define NUM_LEDS 60
29#define MAX_POWER_MILLIAMPS 500
30#define LED_TYPE WS2812B
31#define COLOR_ORDER GRB
32
34Pacifica pacifica(NUM_LEDS);
35
36void setup() {
37 Serial.begin(115200);
40 .setCorrection(TypicalLEDStrip)
41 .setScreenMap(screenMap);
42 FastLED.setMaxPowerInVoltsAndMilliamps(5, MAX_POWER_MILLIAMPS);
43}
44
45void loop() {
47 pacifica.draw(Fx::DrawContext(millis(), leds));
48 FastLED.show();
49 }
50}
51
52#endif // ENABLE_SKETCH
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
#define COLOR_ORDER
#define LED_TYPE
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
void setup()
void loop()
ScreenMap screenMap
Definition FxSdCard.ino:60
#define MAX_POWER_MILLIAMPS
Definition Pacifica.ino:18
_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:33
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
Definition lib8tion.h:1341
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55