├── .gitignore ├── LICENSE ├── README.md ├── breadboard.fzz ├── breadboard.png └── fastled-patterns.ino /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Resseguie/FastLED-Patterns/c51362f68898a28f504f0bc3ee0909640bc3033d/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 David Resseguie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A bunch of sample color patterns using FastLED library for controlling LED strips such as Adafruit Neopixels. 2 | 3 | You'll need to have the FastLED library installed: http://fastled.io/ 4 | 5 | Depending on your specific LED strip, you'll need to be sure you power it appropriately. If you're using the Adafruit Neopixels like I am, they have a lot of information and best practices you'll want to read: https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices 6 | 7 | Here is my setup if it helps you get started. 8 | 9 | ![Sample Breadboard](https://raw.github.com/Resseguie/FastLED-patterns/master/breadboard.png) -------------------------------------------------------------------------------- /breadboard.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Resseguie/FastLED-Patterns/c51362f68898a28f504f0bc3ee0909640bc3033d/breadboard.fzz -------------------------------------------------------------------------------- /breadboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Resseguie/FastLED-Patterns/c51362f68898a28f504f0bc3ee0909640bc3033d/breadboard.png -------------------------------------------------------------------------------- /fastled-patterns.ino: -------------------------------------------------------------------------------- 1 | #include "FastLED.h" 2 | 3 | // How many leds in your strip? 4 | #define NUM_LEDS 240 5 | #define DATA_PIN 6 6 | #define FORWARD 0 7 | #define BACKWARD 1 8 | #define SLOW 250 9 | #define MEDIUM 50 10 | #define FAST 5 11 | 12 | CRGB leds[NUM_LEDS]; 13 | 14 | boolean direction = FORWARD; 15 | 16 | void setup() { 17 | FastLED.addLeds(leds, NUM_LEDS); 18 | randomSeed(analogRead(0)); 19 | Serial.begin(9600); 20 | } 21 | 22 | void loop() { 23 | 24 | rainbow(0,NULL); 25 | delay(3000); 26 | colorWipe(CRGB::Black,FORWARD,FAST); 27 | allRandom(); 28 | delay(3000); 29 | disolve(15,100,MEDIUM); 30 | 31 | for(int i=0; i<3; i++){ 32 | CRGB c1 = randomColor(); 33 | CRGB c2 = randomColor(); 34 | stripes(c1,c2,5); 35 | delay(2000); 36 | stripes(c2,c1,5); 37 | delay(2000); 38 | } 39 | 40 | for(int i=0; i<2; i++){ 41 | cylon(randomColor(), 10,FAST); 42 | } 43 | 44 | 45 | lightning(NULL,15,50,MEDIUM); 46 | lightning(CRGB::White,20,50,MEDIUM); 47 | 48 | for(int i=0; i<3; i++){ 49 | theaterChase(randomColor(),10,SLOW); 50 | } 51 | 52 | theaterChaseRainbow(1,MEDIUM); 53 | 54 | rainbow(FAST,1); 55 | 56 | flash(randomColor(),10,SLOW); 57 | 58 | flash(NULL,50,MEDIUM); 59 | 60 | for(int i=0; i<2; i++){ 61 | colorWipe(randomColor(),FAST,direction); 62 | direction = !direction; 63 | } 64 | 65 | 66 | } 67 | 68 | // Changes all LEDS to given color 69 | void allColor(CRGB c){ 70 | for(int i=0; i= 0; i--) { 223 | for(int j=0; j