Skip to content

Instantly share code, notes, and snippets.

View jasoncoon's full-sized avatar

Jason Coon jasoncoon

View GitHub Profile
@jasoncoon
jasoncoon / LumosRingDemo.ino
Created April 23, 2022 20:35
FastLED DemoReel100 for LumosRing
// FastLED DemoReel100 for LumosRing by Bradán Lane STUDIO
// https://www.tindie.com/products/bradanlane/lumosring-circuitpython-led-ring-block/
#include <FastLED.h>
FASTLED_USING_NAMESPACE
// 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.
// "Close Encounters" by Jason Coon
// https://gist.github.com/pup05/d4c935566ec82731fece
//
// The start of the main light bar on the ship in Close Encounters of the Third Kind: https://www.youtube.com/watch?v=S4PYI6TzqYk
// Multiple anti-aliased light bars running in alternating directions, now just needs the pulses of color.
//
// A slight modification of Mark Kriegsman's Anti-aliased light bar example: http://pastebin.com/g8Bxi6zW
// https://plus.google.com/u/0/112916219338292742137/posts/2VYNQgD38Pw
#include <FastLED.h>
@jasoncoon
jasoncoon / NoiseSmearing
Last active February 22, 2024 19:39 — forked from StefanPetrick/NoiseSmearing
Attempt at converting NoiseSmearing by Stefan Petrick to run on smaller matrices.
// NoiseSmearing by Stefan Petrick: https://gist.github.com/StefanPetrick/9ee2f677dbff64e3ba7a
// Attempt at running on smaller matrices by Jason Coon
#include <FastLED.h>
#define LED_PIN 0
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
#define NUM_LEDS 240
@jasoncoon
jasoncoon / pixelblaze-triple-helix-hourglass.js
Created February 18, 2024 17:22
Pixelblaze Triple Helix Hourglass ⏳⌛️
// Pixelblaze Triple Helix Hourglass
// by Jason Coon, Evil Genius Labs: evilgeniuslabs.org
// This work is licensed under a Creative Commons (4.0 International License):
// Attribution—Noncommercial—Share Alike: https://creativecommons.org/licenses/by-nc-sa/4.0
var pixels = array(pixelCount)
export var maxLevel = 0.25
export var friction = 128
@jasoncoon
jasoncoon / FastLED-Sunrise.ino
Created September 15, 2016 13:38
Simple FastLED "sunrise" example that fades from black to red, orange, yellow, and white.
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 60
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 3
#define CLOCK_PIN 13
/*
Fibonacci64 Touch Demo: https://www.evilgeniuslabs.org/fibonacci64-micro
Copyright (C) 2021 Jason Coon
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@jasoncoon
jasoncoon / gist:5dd9f70cbeec97558c30
Created November 24, 2015 21:41 — forked from mtwhitley/gist:e2b04f5a034fac617d9c
FastLED Fire 2012 Demo (2 Strips)
#include <FastLED.h>
#define DATA_PIN 3
#define CLOCK_PIN 2
#define DATA_PIN_2 7
#define CLOCK_PIN_2 6
#define CHIPSET APA102
#define NUM_LEDS 144
#define BRIGHTNESS 100
@jasoncoon
jasoncoon / Doom Fire Eye
Last active September 11, 2022 11:07
Doom Fire Eye pattern for Pixelblaze & Lux Lavalier
/* DOOM Fire Eye
Slightly modified to polar coords by Jason Coon
Video demo here: https://twitter.com/jasoncoon_/status/1567672583436247046
Updated 2D Fire effect, with "enhanced" dragon's breath mode.
Now with More, Better fire! Version 2 has more dramatic flame,
and an improved wind algorithm.
The method is inspired by the low-res fire in the prehistoric PSX port of DOOM!
@jasoncoon
jasoncoon / Evil Eye
Last active September 10, 2022 16:24
Evil Eye pattern for Lux Lavalier
/**
* Evil Eye 2D - 9/7/2022
* Jason Coon (Evil Genius Labs)
* Video demo: https://twitter.com/jasoncoon_/status/1567671615214731264
*
* Slight modification of Blinky Eyes 2D - 6/5/2022
* Debra Ansell (GeekMomProjects)
*
* Simple code to display 1 blinking eye on an LED matrix. Tested on a Lux Lavalier (40mm Fibonacci64 Micro).
* Fine tuning variable values for the best look will likely depend a lot
// Beating heart pattern. The heart shape is formed by a square turned 45 degees to form a \"diamond\" which is
// the base of the heart. Two semi-circles connect to the upper two sides of the \"diamond\" for the rounded heart
// portion. Depending on your resolution, you may want to play with the anti-aliasing distance to improve the
// definition and appearance of the heart's outline.
//
// Debra Ansell (GeekMomProejcts) 8/18/2022
// Ratio of the height of the heart to the length of one side of the diamond inside it
// length of one side of the diamond is also the diameter of the circle
var ratio = (0.5 + 3*sqrt(2)/4)