This file contains hidden or 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
String[] lines; | |
int xpos=300; | |
int ypos=350; | |
void setup() { | |
size(600, 600); | |
background(200, 50, 50); | |
rectMode(CENTER); | |
} |
This file contains hidden or 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 r = 80; | |
int i = 1; | |
int a = 300; | |
int b = 300; | |
int c = 0; | |
void setup(){ | |
size(600,600); | |
frameRate(150); | |
colorMode(HSB); | |
} |
This file contains hidden or 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
// IMA NYU Shanghai | |
// Interaction Lab | |
/** | |
This example is to send multiple values from Processing to Arduino. | |
You can find the Processing example file in the same folder which works with this Arduino file. | |
Please note that the echo case (when char c is 'e' in the getSerialData function below) | |
checks if Arduino is receiving the correct bytes from the Processing sketch | |
by sending the values array back to the Processing sketch. |
This file contains hidden or 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
// IMA NYU Shanghai | |
// Interaction Lab | |
// For sending multiple values from Arduino to Processing | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { |
This file contains hidden or 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<Ball> balls = new ArrayList<Ball>(); | |
void setup() { | |
size(500, 600); | |
noStroke(); | |
balls = new ArrayList<Ball>(); | |
for (int i=0; i<20; i++) { | |
balls.add(new Ball(width/2, height/2, random(30,75))); | |
} |
This file contains hidden or 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.*; | |
import processing.video.*; | |
Capture cam; | |
int Size = 10; | |
Serial myPort; | |
int valueFromArduino; |