Skip to content

Instantly share code, notes, and snippets.

@jwhendy
jwhendy / _.md
Created February 12, 2014 01:54
transpo explorer
@jwhendy
jwhendy / fill_gradient_demo.ino
Last active October 23, 2015 04:09
A quick demo of using fill_gradient per a request on the FastLED Google+ community.
#include "FastLED.h"
// fast led constants
#define DATA_PIN 3 // change to your data pin
#define COLOR_ORDER GRB // if colors are mismatched; change this
#define NUM_LEDS 28 // change to the number of LEDs in your strip
// change WS2812B to match your type of LED, if different
// list of supported types is here:
// https://github.com/FastLED/FastLED/wiki/Overview
#include "FastLED.h"
// must use fastLED 3.1: https://github.com/FastLED/FastLED/tree/FastLED3.1
// fast led constants and initialize
#define DATA_PIN 9
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 48
CRGB leds[NUM_LEDS];
@jwhendy
jwhendy / matrix-teensy.ino
Last active September 26, 2017 18:11
Code used to run some fun animations/routines on a 16x16 WS2812 LED matrix
/*
* Based on SpectrumAnalyzerBasic by Paul Stoffregen included in the Teensy Audio Library
* Modified by Jason Coon for the SmartMatrix Library
* Requires Teensyduino 1.20 or higher and the Teensy Audio Library
* Also requires FastLED 3.1 or higher
* If you are having trouble compiling, see
* the troubleshooting instructions here:
* https://github.com/pixelmatix/SmartMatrix/#external-libraries
*
* actual code found:
#!/usr/bin/env python
import datetime
import os
import math
import numpy as np
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jwhendy
jwhendy / dash-dynamic-fiddling.py
Last active March 5, 2018 11:58
A plotly dash app where I want to have a dynamic number of text boxes and access their values from a callback when a button is pushed.
import dash
from dash.dependencies import Input, Output, Event, State
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.config.supress_callback_exceptions = True
app.css.append_css({'external_url': 'https://codepen.io/chriddyp/pen/bWLwgP.css'})
font pango:Hack 10
hide_edge_borders both
for_window [class="^.*"] border pixel 1
for_window [class=".*"] title_format " %title"
gaps inner 15
gaps outer 10
set $mod Mod4
floating_modifier $mod