This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Bill from this post: | |
https://plus.google.com/u/0/109149766109138486006/posts/J9Xnqthpgsh | |
//--------------------------------------------------------------- | |
Somewhere at the top of the program: | |
#define NUM_LEDS 32 //length of one strip | |
#define DBL_LEDS NUM_LEDS*2 //double the length of one strip | |
CRGB ledsA[NUM_LEDS]; //strip A (gets displayed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Fading up and down using fadeLightBy | |
//by Scott Kletzien | |
/* | |
Put together & tested by: | |
Scottie Digital | |
*/ | |
#include "FastLED.h" | |
#define NUM_LEDS 288 // # of LEDS in the strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*************************************************************** | |
// Quick example of lighting up blocks of pixels | |
// | |
// Marc Miller, Aug 2017 | |
//*************************************************************** | |
#include "FastLED.h" | |
#define LED_TYPE LPD8806 | |
#define DATA_PIN 11 | |
#define CLOCK_PIN 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originally from this post: | |
https://plus.google.com/100542328320334100166/posts/Y5BdWFEvfo1 | |
Copied here since G+ is going away. | |
----------------------------------------------------------------------- | |
When using fill_rainbow... | |
To make the rainbow flow go the other way you can multiply the millis bit by -1: | |
change this: | |
fill_rainbow( leds[x], stripLength, millis()/2, 256/stripLength ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Info posted for this post: | |
https://plus.google.com/101381095273549449891/posts/FqmG6S4rjpz | |
Another option (that uses a bit more memory) is to use a second array (let's call it leds_display) that | |
you copy your leds data to with the offset before displaying. So it the top of your program you will | |
have two CRGB arrays: | |
CRGB leds[NUM_LEDS]; //working array | |
CRGB leds_display[NUM_LEDS]; //array that gets displayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint8_t ppm = 150; //pixels per matrix | |
//You can do something like this to simply copy the data to the other matrices as the first matrix is filled in. | |
for (uint16_t i=0; i<ppm; i++) { | |
leds[i] = CHSV(random8(),255,255); | |
// copy to other matrices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ff00 0000 ff00 0000 ffff 00ff 00ff ffff | |
ff00 0000 00ff ffff a0a0 a480 8080 8080 | |
8080 8080 8080 8080 8080 a0a0 a4a0 a0a4 | |
a0a0 a4a0 a0a4 a0a0 a4a0 a0a4 8080 8080 | |
8080 8080 80a0 a0a4 a0a0 a4a0 a0a4 8080 | |
8080 8080 a0a0 a4a0 a0a4 a0a0 a4a0 a0a4 | |
7f9f 5555 5f55 555f 557f 7f55 7f7f 5580 | |
8080 a0a0 a4a0 a0a4 7f7f 557f 5f55 a0a0 | |
a4a0 a0a4 8080 807f 9f55 557f 5555 5f55 | |
7fbf 55aa bf55 aadf 55aa bf55 aa9f 5580 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*************************************************************** | |
// Untested code | |
// For reading R,G,B serial data sent from computer to LED controller. | |
// | |
//*************************************************************** | |
//serial read of data to feed to FastLED | |
#include "FastLED.h" | |
//setup LEDs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*************************************************************** | |
// Delayed duplicate pattern using timer experiment. | |
// | |
// This example displays a pattern on the first half of a strip | |
// (call it section A) and then the same pattern is displayed | |
// on the second half of the strip (section B) but it's start | |
// time is delayed by a specified amount of time. | |
// | |
// Marc Miller, Feb 2017 | |
//*************************************************************** |
NewerOlder