Skip to content

Instantly share code, notes, and snippets.

int trumpFactor;
void setup() {
size(500, 500);
}
void draw() {
background(255);
translate(width/2, height/2);
@zamfi
zamfi / champagne.js
Last active October 5, 2017 17:25 — forked from anonymous/champagne.js
var circles = [];
function setup() {
createCanvas(400, 400);
var count = 0;
while (count < 20) {
circles.push({
x: random(width),
y: height,
vx: 0,
background(255);
strokeWeight(3);
colorMode(HSB);
while (true) {
var h = random(360)
stroke(h, 50, 90);
fill(h, 50, 100);
var r = random(30, 60);
@zamfi
zamfi / cycling-hue.js
Last active September 20, 2017 18:28 — forked from anonymous/cycling-hue.js
background(255);
noStroke();
var h = 0;
while(true) {
background(255);
colorMode(HSB);
fill(h, 100, 100);
ellipse(width/2, height/2, 100, 100);
@zamfi
zamfi / .block
Last active August 3, 2017 20:24
testing data
license: mit
#include <CapacitiveSensor.h>
/*
* CapitiveSense Library Demo Sketch
* Paul Badger 2008
* Uses a high value resistor e.g. 10M between send pin and receive pin
* Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values.
* Receive pin is the sensor pin - try different amounts of foil/metal on this pin
*/
const int numPins = 12;
const int pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
const int motionSensePin = A0;
void setup() {
for (int i = 0; i < numPins; ++i) {
pinMode(pins[i], OUTPUT);
}
pinMode(motionSensePin, INPUT);
const int numPins = 12;
const int pins[] = {2,3,4,5,6,7,8,9,10,11,12,13};
void setup() {
for (int i = 0; i < numPins; ++i) {
pinMode(pins[i], OUTPUT);
}
}
int litPin = 0;
@zamfi
zamfi / README.md
Last active November 2, 2015 20:47
communicating with flashes
def determine_winner(board):
""" board takes the form of a String
with the indices representing each
of these squares:
0 | 1 | 2
---+---+---
3 | 4 | 5
---+---+---
6 | 7 | 8