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 org.openkinect.processing.*; //<>// | |
// Kinect Library object | |
Kinect kinect; | |
PImage img; | |
float minThresh = 200; | |
float maxThresh = 600; | |
float sumX = 0; | |
float sumY = 0; |
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 processing.serial.*; | |
PVector a = new PVector(150, 0); | |
PVector b = new PVector(0, 150); | |
float angle; | |
Serial myPort; // Create object from Serial class | |
PVector v1; | |
PVector v2; | |
//float a; |
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
char val; // Data received from the serial port | |
int ledPin = 13; // Set the pin to digital I/O 13 | |
#include <Servo.h> | |
Servo servo1; | |
void setup() { | |
pinMode(ledPin, OUTPUT); // Set pin as OUTPUT | |
Serial.begin(9600); // Start serial communication at 9600 bps | |
servo1.attach(9); | |
} |
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
var serial; // variable to hold an instance of the serialport library | |
var portName = '/dev/cu.usbmodem1411'; // fill in your serial port name here | |
var inData; | |
var values; | |
var j; | |
//var mappedValue; | |
var counter1=0; | |
var counter2=0; | |
var counter3=0; | |
var counter4=0; |
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
// Arduino code for getting data from 5 piezo sensors | |
void setup() | |
{ | |
Serial.begin(9600); | |
//pinMode(ledPin, OUTPUT); | |
} | |
void loop() | |
{ |
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
var acc, vel, xpos, ypos; | |
var balls= []; | |
function setup() { | |
createCanvas(400, 400); | |
//for(i=0;i<10;i++){ | |
// balls[i] = new Balls; | |
} |
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
var balls = []; | |
var angle = [0,30,60,90,120,150,180,210,240,270,300,330,360]; | |
function setup() { | |
createCanvas(400,400); | |
} |
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
var balls = []; | |
var angle = [0,30,60,90,120,150,180,210,240,270,300,330]; | |
function setup() { | |
createCanvas(400,400); | |
for(i=0; i<12; i++) { | |
balls[i] = new Cracker(); | |
} | |
} |
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
var serial; // variable to hold an instance of the serialport library | |
var portName = '/dev/cu.usbmodem1411'; // fill in your serial port name here | |
var pot1; | |
var pot2; | |
var pot3; | |
var button1; | |
var whatever1 = 0; | |
var whatever2 = 0; | |
var whatever3 = 0; | |
var whatever4 = 0; |
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
var serial; // variable to hold an instance of the serialport library | |
var portName = '/dev/cu.usbmodem1431'; // fill in your serial port name here | |
var inData; | |
var pot1; | |
var pot2; | |
var pot3; | |
var songon = 0; | |
var flag = 0; | |
var whatever1 = 0; | |
var whatever2 = 0; |