Skip to content

Instantly share code, notes, and snippets.

Avatar

J.D. Zamfirescu zamfi

View GitHub Profile
View circles-arrays.js
var x = [];
var y = [];
var xSpeed = [];
var ySpeed = [];
var colors = [];
function setup() {
createCanvas(400, 400);
for (var index = 0; index < 100; index = index + 1) {
View trump.pde
int trumpFactor;
void setup() {
size(500, 500);
}
void draw() {
background(255);
translate(width/2, height/2);
View champagne.js
var circles = [];
function setup() {
createCanvas(400, 400);
var count = 0;
while (count < 20) {
circles.push({
x: random(width),
y: height,
vx: 0,
View random-circles.js
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);
View 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 Aug 3, 2017
testing data
View .block
license: mit
View modified cap sense
#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
*/
View stillness.ino
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);
View seconds.ino
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 Nov 2, 2015
communicating with flashes
You can’t perform that action at this time.