View difference between Paste ID: pjpderRB and jtRFU6MB
SHOW: | | - or go back to the newest paste.
1-
// Uncomment this line if you have any interrupts that are changing pins - this causes the library to be a little bit more cautious
1+
2-
// #define FAST_SPI_INTERRUPTS_WRITE_PINS 1
2+
3
// How many leds in your strip?
4-
// Uncomment this line to force always using software, instead of hardware, SPI (why?)
4+
5-
// #define FORCE_SOFTWARE_SPI 1
5+
6
// For led chips like Neopixels, which have a data line, ground, and power, you just
7-
// Uncomment this line if you want to talk to DMX controllers
7+
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
8-
// #define FASTSPI_USE_DMX_SIMPLE 1
8+
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
9
#define DATA_PIN 6
10
#define CLOCK_PIN 8
11
12
// Define the array of leds
13
CRGB leds[NUM_LEDS];
14
15
void setup() { 
16
      // Uncomment/edit one of the following lines for your leds arrangement.
17
      // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
18
      // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
19
      // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
20
      // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
21-
void setup() {
21+
      // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
22-
	// sanity check delay - allows reprogramming if accidently blowing power w/leds
22+
      // FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
23-
   	delay(2000);
23+
      //  FastLED.addLeds<NEOPIXEL, DATA_PIN, RGB>(leds, NUM_LEDS);
24
      // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
25-
   	// For safety (to prevent too high of a power draw), the test case defaults to
25+
26-
   	// setting brightness to 25% brightness
26+
      // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
27-
   	LEDS.setBrightness(64);
27+
      // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
28-
   
28+
      // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
29-
   FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
29+
30
       FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
31-
   	// LEDS.addLeds<WS2811, 13>(leds, NUM_LEDS);
31+
      // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
32-
   	// LEDS.addLeds<TM1809, 13>(leds, NUM_LEDS);
32+
      // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
33-
   	// LEDS.addLeds<UCS1903, 13>(leds, NUM_LEDS);
33+
34-
   	// LEDS.addLeds<TM1803, 13>(leds, NUM_LEDS);
34+
35
void loop() { 
36-
   	// LEDS.addLeds<P9813>(leds, NUM_LEDS);
36+
37-
   	//CLEDController *pLed = new ClocklessController_Trinket<4, NS(400), NS(400), NS(450), GRB>();
37+
38-
   	//LEDS.addLeds(pLed, leds, NUM_LEDS);
38+
  for (int j=0; j< NUM_LEDS; j++){
39-
   	// LEDS.addLeds<LPD8806>(leds, NUM_LEDS);
39+
40-
	// LEDS.addLeds<WS2801>(leds, NUM_LEDS);
40+
41-
   	// LEDS.addLeds<SM16716>(leds, NUM_LEDS);
41+
42
for (int i=255;i>=0;i--){
43-
   	// LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS);
43+
  for (int j=0; j< NUM_LEDS; j++){
44
    leds [j] = yourcolor.nscale8_video(i);
45-
	// Put ws2801 strip on the hardware SPI pins with a BGR ordering of rgb and limited to a 1Mhz data rate
45+
46-
	// LEDS.addLeds<WS2801, 11, 13, BGR, DATA_RATE_MHZ(1)>(leds, NUM_LEDS);
46+
}}