Skip to content

Instantly share code, notes, and snippets.

int value;
void setup() {
size(640, 360);
}
void draw() {
background(102);
pushMatrix();
translate(width*0.2, height*0.5);
int x = 1;
int y = 2;
int value;
void setup ()
{
size(1200, 1200);
pixelDensity (2);
}
void draw ()
@jessherzog
jessherzog / button
Created September 24, 2015 20:06
button pressed, led stays on or off
const int buttonPin = 7;
const int ledPin = 11;
int ledState = LOW;
int buttonState = 0;
boolean pressed = false;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
@jessherzog
jessherzog / code_Scene_2.pde
Created September 28, 2015 06:30
code sketch 2
//variables
int a = 40;
int b = 255;
float ok = 255;
float ya = 500;
float yo = 0;
//boolean stroke() = true;
//boolean noStroke() = false;
void setup() {
@jessherzog
jessherzog / potent_fade_blink.ino
Last active September 29, 2015 20:39
potentiometer / fade / blink
@jessherzog
jessherzog / code_Scene3.pde
Created October 4, 2015 22:06
wild donuts
// images are in zip file link in Assignment submission !!
float x = 0;
float y = 10;
float z = 0;
PImage a;
PImage b;
PImage c;
void setup() {
// six pins instead of three.
int ledPin1 = 8;
int ledPin2 = 9;
int ledPin3 = 10;
int ledPin4 = 11;
int ledPin5 = 12;
int ledPin6 = 13;
int ledPins[6] = (8, 9, 10, 11, 12, 13);
int ledPins[] = { 3, 5, 6, 9, 10, 11, 10, 9, 6, 5, };
int pinCount = 10;
int ledFade[10];
int i;
int prevTime;
int interval = 500;
int fadeSpeed = 5;
int prevFadeTime;
void setup() {
/*
@jessherzog
jessherzog / softcandy.pde
Created October 12, 2015 00:56
code_Sketch4
//Use oscillation (sin() and cos()) and loops (for or while)
PImage a;
float posX = 2;
float posY = 2;
float sizeX = 0;
float sizeY = 0;
float time = 0;
//float previousMillis = 0;
//int interval = 100;
color[] colors = new color[2];
@jessherzog
jessherzog / code_Scene5.pde
Last active October 25, 2015 03:15
state changes / plant growing
// as you click each slide, the plant stem grows!
// you can toggle back and forth using the left and right arrow keys.
float posX = 2;
float posY = 2;
float sizeX = 0;
float sizeY = 0;
int lineX = 0;
int lineY = 0;