Skip to content

Instantly share code, notes, and snippets.

View jasoncoon's full-sized avatar

Jason Coon jasoncoon

View GitHub Profile
@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 / 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)
// 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)
/*
FastLED Mapping Demo: https://github.com/jasoncoon/led-mapper
Copyright (C) 2022 Jason Coon, Evil Genius Labs LLC
For LumosRing by Bradán Lane STUDIO
https://www.tindie.com/products/bradanlane/lumosring-circuitpython-led-ring-block/
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
@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.
@jasoncoon
jasoncoon / fibonacciStars
Last active March 15, 2022 13:57
Star pattern for Fibonacci256: https://www.tindie.com/products/19429
// Fibonacci Stars pattern by Jason Coon
// For Fibonacci256: https://www.tindie.com/products/19429
// Meant for use in this sketch: https://github.com/jasoncoon/esp8266-fastled-webserver/tree/fibonacci256
// Draws shooting stars radiating outward from the center, along Fibonacci spiral lines.
void fibonacciStarsWithOffset(uint16_t stars[], uint8_t starCount, uint8_t offset = 21, bool setup = false, bool move = false) {
// use a number from the Fibonacci sequence for offset to follow a spiral out from the center
for (uint8_t i = 0; i < starCount; i++) {
@jasoncoon
jasoncoon / code.py
Created September 18, 2021 13:25
Fibonacci64 - Expanding Rainbows - CircuitPython & NeoPixel Library
# Fibonacci64 - Expanding Rainbows - CircuitPython & NeoPixel
# https://gist.github.com/jasoncoon/a70d24ed38994aa669f943c2e84512e4
# https://www.evilgeniuslabs.org/fibonacci64-micro
# This example uses CircuitPython and the Adafruit NeoPixel library
# You'll need neopixel.mpy in your /lib directory
# More information: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries
import board
import neopixel
/*
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,