This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int rows = 10; | |
int columns = 12; | |
int[] circles = new int[rows*columns]; | |
int index; | |
int spacing = 50; | |
int circleSize = 6; | |
void setup() | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Robotic arm speed control demo | |
Natalie Freed, Jan 2014 | |
*/ | |
#include <Servo.h> | |
Servo base, shoulder, elbow, wrist, gripper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Draggable objects and handler example for Processing 2.0 | |
Natalie Freed, March 2014 | |
*/ | |
DraggableHandler circles; | |
void setup() | |
{ | |
size(500, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//RGB Color-Mixing LED | |
//For LilyPad ProtoSnap | |
/************************************* | |
//Change the variables in this section | |
//Colors are between 0 and 255 | |
//Times are in milliseconds. For eg., 1 second = 1000 milliseconds. | |
*************************************/ | |
int colors[][3] = { {255, 150, 0}, {100, 0, 200}, {255, 0, 0}}; | |
int times[] = { 5000, 1000, 500 }; | |
int numberOfColors = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//count pressed, turn from red to green by Natalie Freed | |
//April 2014 | |
//with debounce code from David Mellis | |
int red = 9; | |
int blue = 10; | |
int green = 11; | |
int buttonPin = A5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayList<RectangularButton> buttons = new ArrayList<RectangularButton>(); | |
RectangularButton startButton; | |
boolean startClicked = false; | |
String currentState = "STOPPED"; | |
boolean timerRunning = false; | |
int time = 0; | |
int timeStarted = millis(); | |
int countInterval = 1000; //timer counts seconds | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SquareCreature squareling; | |
float tblink, tbounce = 0; | |
int numSleepyImgs = 4; | |
PImage happyImg, blinkImg, angryImg, sleepyImg; | |
PImage[] sleepyImgs = new PImage[numSleepyImgs]; | |
void setup() | |
{ | |
imageMode(CENTER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import controlP5.*; | |
ControlP5 cp5; | |
DraggableHandler circles; | |
ArrayList<Draggable> shapes; | |
int toolbarWidth = 75; | |
PVector toolbarLoc; | |
int codeMenuWidth = 300; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Register key events in Processing 2.0 | |
//Natalie Freed 2014 | |
//References:http://processing.org/reference/javadoc/core/processing/event/KeyEvent.html | |
//http://forum.processing.org/one/topic/how-to-register-methods-in-processing-2b1.html | |
//http://wiki.processing.org/w/Register_events (1.0 way) | |
//circle changes color when 'c' key pressed, changes back when key released | |
KeyboardyCircle kc = new KeyboardyCircle(0, this); |
OlderNewer