Skip to content

Instantly share code, notes, and snippets.

View kriegsman's full-sized avatar

Mark Kriegsman kriegsman

  • Boston
View GitHub Profile
@kriegsman
kriegsman / MapTwinkle.ino
Created August 25, 2015 21:09
MapTwinkle- randomly twinkle pixels up from a base color to a peak color and back down.
#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
@kriegsman
kriegsman / PaletteBeat.ino
Created August 25, 2015 20:13
PaletteBeat- pulse between two color palettes at a given BPM
#include "FastLED.h"
// PaletteBeat
// Shows how to pulse back and forth between two color palettes
// at a given number of beats per minute.
//
// The two color palettes in the pulse cycle each can
// also independently morph and shift -- although choosing
// new target palettes is not shown here.
//
@kriegsman
kriegsman / MarqueeOverlay.ino
Created August 20, 2015 21:40
MarqueeOverlay - render marquee-like effects on segments of a display (for YUM cart, Burning Man 2015)
#include "FastLED.h"
// MarqueeOverlay
//
// Code to overlay a 'marquee' effect on top
// of other animations, e.g. to highlight individual
// letters of a sign one after another, while
// still allowing the underlying animations to show through.
//
// Initially designed for the "YUM cart" for Burning Man 2015.
@kriegsman
kriegsman / ColorWavesWithPalettes.ino
Created August 19, 2015 01:24
ColorWavesWithPalettes - demo of using cpt-city palettes in FastLED code
#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:
@kriegsman
kriegsman / TwoAnimationsAtTheSameTime.ino
Last active August 19, 2022 17:54
TwoAnimationsAtTheSameTime - one way to run two different animations at the same time.
#include "FastLED.h"
// TwoAnimationsAtTheSameTime
// Example showing one way to run two different animations on
// two different parts of one LED array at the same time.
//
// The three keys to success here are:
//
// 1. Move the drawing of each animation into a separate 'draw' function,
// each of which is called from 'loop()'. Each 'draw' function draws
@kriegsman
kriegsman / DiscoStrobe.ino
Created July 8, 2015 19:03
DiscoStrobe - Flashing rainbow lights that zoom back and forth to a beat
#include "FastLED.h"
// DiscoStrobe
// *Flashing* rainbow lights that zoom back and forth to a beat.
// See your doctor before using this code if you have certain neurological conditions.
//
// Mark Kriegsman, July 2015
#if FASTLED_VERSION < 3001000
@kriegsman
kriegsman / FireworksXY.ino
Last active May 6, 2022 14:07
FireworksXY: a quick and dirty 2-D fireworks simulation using FastLED
#include "FastLED.h"
// FireworksXY
// Quick and dirty 2-D fireworks simulation using FastLED.
//
// Originaly designed an Adafruit 5x8 WS2811 shield, but works fine
// on other XY matricies.
//
// by Mark Kriegsman, July 2013
// (and not updated too much since then, so it's a little stale,
@kriegsman
kriegsman / Pride2015.ino
Last active November 29, 2023 23:36
Pride2015 - animated, ever-changing rainbows
#include "FastLED.h"
// Pride2015
// Animated, ever-changing rainbows.
// by Mark Kriegsman
#if FASTLED_VERSION < 3001000
#error "Requires FastLED 3.1 or later; check github for latest code."
#endif
@kriegsman
kriegsman / DemoReel2Arg.ino
Created January 12, 2015 18:21
Variation on DemoReel100, showing passing of (hardcoded) parameters ... there are other ways to do this, but this is a simple start.
#include "FastLED.h"
// MODIFIED FastLED "just-100-lines-of-code" demo reel
//
// This example also shows one easy way to define multiple
// TWO-ARGUMENT animations patterns and have them automatically rotate.
//
// -Mark Kriegsman, January 2015
#if FASTLED_VERSION < 3001000
@kriegsman
kriegsman / TimecodePerformance.ino
Created January 8, 2015 17:24
Sequence a performance using timecode HH,MM,SS.SSS
#include "FastLED.h"
// This sketch shows how to sequence a performance using HH,MM,SS.SSS timecode.
//
// A "ResetPerformance" method is provided so that the performance can be
// restarted from a custom external trigger, e.g., a button or event.
// For demonstration purposes, this Performance is reset if the
// sketch receives a letter "r" on the serial port.
//
// -Mark Kriegsman, January 2015