Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
#include "FastLED.h" | |
#if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) | |
#warning "Requires FastLED 3.1 or later; check github for latest code." | |
#endif | |
#define NUM_LEDS 100 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER GRB |
// Updated sinelon (no visual gaps) | |
void sinelon() | |
{ | |
// a colored dot sweeping | |
// back and forth, with | |
// fading trails | |
fadeToBlackBy( leds, NUM_LEDS, 20); | |
int pos = beatsin16(13,0,NUM_LEDS); | |
static int prevpos = 0; |
#include "FastLED.h" | |
// DiscoStrobeWithPalette | |
// *Flashing* rainbow lights that zoom back and forth to a beat. | |
// See your doctor before using this code if you have certain neurological conditions. | |
// | |
// Same as "DiscoStrobe" (July 2015), except updated to use a | |
// color palette of your choice instead of the HSV color wheel. | |
// Default color palette is a section of Purple, Green, Orange, | |
// and White for Halloween decor. |
#include "FastLED.h" | |
// MapTwinkle | |
// Designed to illuminate a 'map' of pixels, each of which randomly | |
// sometimes twinkles brighter and then back down to it's base color again. | |
// | |
// Parameters include: background color, peak twinkle color, and speed | |
// of brightening and dimming. | |
// | |
// Mark Kriegsman, August 2015 |
#include "FastLED.h" | |
// ColorWavesWithPalettes | |
// Animated shifting color waves, with several cross-fading color palettes. | |
// by Mark Kriegsman, August 2015 | |
// | |
// Color palettes courtesy of cpt-city and its contributors: | |
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/ | |
// | |
// Color palettes converted for FastLED using "PaletteKnife" v1: |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
This script has moved to https://github.com/Arty2/userstyles |
See https://github.com/romainl/vim-rnb for an up-to-date version.
#include "FastLED.h" | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. | |
// | |
// -Mark Kriegsman, December 2014 |
# Build arguments for the gn build | |
# You can set these with `gn args out/Default` | |
# ( and they're stored in src/out/Default/args.gn ) | |
# See "gn args out/Default --list" for available build arguments | |
# component build, because people love it | |
is_component_build = true | |
# release build, because its faster | |
is_debug = true |