FastLED
3.9.15
Loading...
Searching...
No Matches
AdafruitBridge.ino
Go to the documentation of this file.
1
// Simple Adafruit Bridge Demo
2
//
3
// This example shows how to use the Adafruit_NeoPixel library with FastLED.
4
// As long as the Adafruit_NeoPixel library is installed (that is #include <Adafruit_NeoPixel.h>
5
// is present), this example will work. Otherwise you'll get warnings about a missing driver.
6
7
#define FASTLED_USE_ADAFRUIT_NEOPIXEL
8
#include "
FastLED.h
"
9
10
#define DATA_PIN 3
11
#define NUM_LEDS 10
12
13
CRGB
leds
[
NUM_LEDS
];
14
uint8_t
hue
= 0;
15
16
void
setup
() {
17
FastLED
.addLeds<
WS2812
,
DATA_PIN
,
GRB
>(
leds
,
NUM_LEDS
);
18
FastLED
.setBrightness(50);
19
}
20
21
void
loop
() {
22
fill_rainbow
(
leds
,
NUM_LEDS
,
hue
, 255/
NUM_LEDS
);
23
FastLED
.show();
24
25
hue
++;
26
delay(50);
27
}
leds
CRGB leds[NUM_LEDS]
Definition
AdafruitBridge.ino:13
NUM_LEDS
#define NUM_LEDS
Definition
AdafruitBridge.ino:11
setup
void setup()
Definition
AdafruitBridge.ino:16
hue
uint8_t hue
Definition
AdafruitBridge.ino:14
DATA_PIN
#define DATA_PIN
Definition
AdafruitBridge.ino:10
loop
void loop()
Definition
AdafruitBridge.ino:21
FastLED
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp:74
FastLED.h
central include file for FastLED, defines the CFastLED class/object
WS2812
WS2812 controller class.
Definition
FastLED.h:218
fill_rainbow
void fill_rainbow(struct CRGB *targetArray, int numToFill, fl::u8 initialhue, fl::u8 deltahue=5)
Fill a range of LEDs with a rainbow of colors.
Definition
fill.cpp:29
GRB
@ GRB
Green, Red, Blue (0102)
Definition
eorder.h:16
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:86
examples
AdafruitBridge
AdafruitBridge.ino
Generated on Fri Aug 22 2025 20:59:33 for FastLED by
1.13.2