Skip to content

Instantly share code, notes, and snippets.

View jasoncoon's full-sized avatar

Jason Coon jasoncoon

View GitHub Profile
// Based off code from here - http://www.reddit.com/r/gifs/comments/2on8si/connecting_to_server_so_mesmerizing/cmow0sz
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var numBalls = 32; // numb balls
var timeStep = 0;
var ballYTravel = 32;
var animationPosX = 0;
final float WAVE_HEIGHT = 16;
final float SPACING = 1;
final int NUM_BALL = 32;
final int BALL_RADIUS = 1;
int timeStep = 0;
//WAVE_HEIGHT, SPACING, and NUM_BALL all affect the size of the window. BALL_RADIUS does not.
void setup() {
size((int)(WAVE_HEIGHT * 2), (int)(WAVE_HEIGHT * 2));
/*
@jasoncoon
jasoncoon / BlinkyTile-Simple-Cycle
Created December 25, 2014 20:08
BlinkyTile Simple Cycle Example
// The simplest possible way to talk to a BlinkyTape
import processing.serial.*;
Serial s;
void setup() {
// Connect to the first serial port we can find
// We assume there is a BlinkyTape there
s = new Serial(this, "COM6", 115200);
}
// Falling Fairies pattern by Jason Coon, November 2015
// https://gist.github.com/jasoncoon/ac9f3a4a3e0c2f02bfed
#include <FastLED.h>
#define LED_PIN 3
#define COLOR_ORDER GRB
#define CHIPSET WS2811
#include "SmartMatrix.h"
#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
#include <FastLED.h>
FASTLED_USING_NAMESPACE
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#define DATA_PIN D7
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
Including:
src\XYMatrix.ino
project.properties
attempting to flash firmware to your device flaming_turtle_narwhal
Flash device failed.
In file included from /src/XYMatrix.cpp:10:0:
lib/MyFastLED/src/MyFastLED.h:17:21: note: #pragma message: FastLED version 3.001.005
# pragma message "FastLED version 3.001.005"
^
In file included from lib/MyFastLED/src/controller.h:9:0,
@jasoncoon
jasoncoon / FastLED-HSV-Dials.ino
Created April 7, 2017 00:54
FastLED HSV Dials - Example project showing how to use Hue, Saturation, and Value to create color.
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 12
#define DATA_PIN 0
#define HUE_PIN A4
#define SAT_PIN A5
#define VAL_PIN A6
@jasoncoon
jasoncoon / FastLED-RGB-Dials.ino
Created April 7, 2017 00:55
FastLED RGB Dials - Example project showing how to use Red, Green, and Blue to create color.
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 8
#define DATA_PIN 0
#define RED_PIN A7
#define GREEN_PIN A8
#define BLUE_PIN A9
@jasoncoon
jasoncoon / FastLED-HSV-Game.ino
Created April 24, 2017 21:31
FastLED HSV Game
#include <Bounce.h>
#include <FastLED.h>
// How many leds in your strip?
#define NUM_LEDS 8
// Data pin for the LEDs
#define DATA_PIN 17
// Potentiometer pins