Skip to content

Instantly share code, notes, and snippets.

Jl9549

  • Joined Apr 15, 2019
View GitHub Profile
View ProcessingProject2
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.
View ArduinoProject2
#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];
View ProcessingProject1
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 **/
View ArduinoProject1
void setup() {
Serial.begin(9600);
}
void loop() {
int sensor1 = analogRead(A0);
int sensor2 = analogRead(A1);
// int sensor3 = analogRead(A2);
// keep this format
View gist:58e8beb374a81da5f7fd64a142dca874
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);
View gist:c40df7100e3f9569979c8c75add094a8
PImage bg;
int y;
void setup() {
size(500, 500);
bg = loadImage("Flowers.jpg");
background(bg);
stroke(226, 204, 0);
You can’t perform that action at this time.