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
PImage bg; | |
int y; | |
void setup() { | |
size(500, 500); | |
bg = loadImage("Flowers.jpg"); | |
background(bg); | |
stroke(226, 204, 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
int z = 300; | |
boolean a = false; | |
int x = 300; | |
int y = 300; | |
int c = 0; | |
void setup() | |
{ | |
size(600, 600); | |
frameRate(60); | |
colorMode(HSB, 100); |
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
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int sensor1 = analogRead(A0); | |
int sensor2 = analogRead(A1); | |
// int sensor3 = analogRead(A2); | |
// keep this format |
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.*; | |
String myString = null; | |
Serial myPort; | |
int PORT_INDEX = 0; | |
int NUM_OF_VALUES = 2; /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/ | |
int[] sensorValues; /** this array stores values from Arduino **/ | |
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
#define NUM_OF_VALUES 2 /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/ | |
/** DO NOT REMOVE THESE **/ | |
int tempValue = 0; | |
int valueIndex = 0; | |
/* This is the array of values storing the data from Processing. */ | |
int values[NUM_OF_VALUES]; |
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.*; | |
int NUM_OF_VALUES = 2; /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/ | |
Serial myPort; | |
String myString; | |
int PORT_INDEX = 0; | |
// This is the array of values you might want to send to Arduino. |
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.*; | |
String myString = null; | |
Serial myPort; | |
PImage photo; | |
PImage photo2; | |
int PORT_INDEX =0; | |
int NUM_OF_VALUES = 2; /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/ | |
int[] sensorValues; /** this array stores values from Arduino **/ |
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.*; | |
String myString = null; | |
Serial myPort; | |
PImage photo; | |
PImage photo2; | |
int PORT_INDEX =0; | |
int NUM_OF_VALUES = 2; /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/ | |
int[] sensorValues; /** this array stores values from Arduino **/ |
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
float r,g,b; | |
int x, y; | |
void setup() | |
{ | |
size(500, 500); | |
ellipseMode(CORNER); | |
} | |
void draw() |
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
// IMA NYU Shanghai | |
// Interaction Lab | |
// For sending multiple values from Arduino to Processing | |
#define LED 13 | |
boolean led_state = LOW; | |
unsigned char counter; | |
unsigned long temp[21]; | |
unsigned long sub; | |
bool data_effect = true; | |
unsigned int heart_rate; |
OlderNewer