Skip to content

Instantly share code, notes, and snippets.

View adammhaile's full-sized avatar

Adam Haile adammhaile

View GitHub Profile
@adammhaile
adammhaile / gist:9544a512efe8f848783b
Created April 28, 2015 16:25
Wyolum Cube Animation
from matrix_animations import *
class WyoCubeBloom(BaseMatrixAnim):
def __init__(self, led, dir = True):
super(WyoCubeBloom, self).__init__(led)
self._vector = genVector(16, 16)
self._dir = dir
self._panelOffset = [0,8,16,24,32,40]
def step(self, amt = 8):
@adammhaile
adammhaile / FastLEDDisk.ino
Last active November 27, 2020 03:11
Examples of using angle and radius to select pixels on a circular pixel layout using FastLED
#include "FastLED.h"
#define NUM_LEDS 255
#define DATA_PIN SPI_DATA
#define CLOCK_PIN SPI_CLOCK
// Define the array of leds
CRGB leds[NUM_LEDS];
@adammhaile
adammhaile / LEDCircle_demo.py
Last active August 29, 2015 14:20
LEDCircle Demo with AllPixel and APA102 Disk from AdaFruit
from bibliopixel import *
from bibliopixel.led import *
from bibliopixel.animation import BaseCircleAnim
class DiskBloom(BaseCircleAnim):
def __init__(self, led):
super(DiskBloom, self).__init__(led)
self._dir = dir
#! /usr/bin/env python
'''
Generates Inkscape SVG file containing box components needed to
laser cut a tabbed construction box taking kerf and clearance into account
Copyright (C) 2011 elliot white [email protected]
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.
@adammhaile
adammhaile / circle_test.py
Created June 4, 2015 04:37
LEDCircle Coord Mapping Test
from bibliopixel import *
from bibliopixel.led import *
from bibliopixel.animation import BaseCircleAnim
class DiskBloom(BaseCircleAnim):
def __init__(self, led, spread = 1):
super(DiskBloom, self).__init__(led)
self._dir = dir
self.spread = spread
from bibliopixel import LEDCircle
def genDisplayParams():
rings = [
#14,
[348,349],
#13
[342,343,344,345,346,347],
#12
[334, 335, 336, 337, 338, 339, 340, 341],
from bibliopixel.animation import BaseCircleAnim
import bibliopixel.colors as colors
class DiskBloom(BaseCircleAnim):
def __init__(self, led, spread = 1):
super(DiskBloom, self).__init__(led)
self.spread = spread
def step(self, amt = 8):
from bibliopixel.animation import BaseAnimation
from threading import Lock
import time
class AnimationChooser(BaseAnimation):
def __init__(self, led):
super(AnimationChooser, self).__init__(led)
self.anims = {}
self.curAnim = None
@adammhaile
adammhaile / WS281X.py
Created July 28, 2016 21:37
BP Testing
import time
from bibliopixel.drivers.driver_base import DriverBase, ChannelOrder
from bibliopixel import gamma
from neopixel import *
# Default LED strip configuration:
# num = 16 # Number of LED pixels.
# ledPin = 18 # GPIO pin connected to the pixels (must support PWM! pin 13 or 18 on RPi 3).
# ledFreqHz = 800000 # LED signal frequency in hertz (800khz or 400khz)
# ledDma = 5 # DMA channel to use for generating signal (Between 1 and 14)
#include <SmartMatrix3.h>
#include <EEPROM.h>
#define FIRMWARE_VER 2
namespace CMDTYPE
{
enum CMDTYPE
{
SETUP_DATA = 1,