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
function setup() { | |
createCanvas(800,800); | |
background(0); | |
frameRate(1800); | |
} | |
var x,a,m,on=false,z,q=-200,o=10,b=20,s; | |
function 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
function setup() { | |
createCanvas(800,800); | |
background(0); | |
frameRate(1800); | |
} | |
var x,a,m,on=false,z,q=-200,o=10,b=20,s; | |
function 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
function setup() { | |
createCanvas(800, 800); | |
background(0); | |
frameRate(2400); | |
} | |
var m = false; | |
function 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
int y1 = A0; | |
int x2 = A1; | |
int y2 = A2; | |
int x1 = A3; | |
int ledPin0 = 2; | |
int ledPin1 = 3; | |
int ledPin2 = 4; | |
int ledPin3 = 5; |
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; | |
var speedx = 1; | |
var speedy = 1; | |
var x = 10; | |
var y = 0; | |
var gravity = 0.1; | |
var pos = 0; | |
var len = 40; | |
var score = 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 y1 = A0; | |
int x2 = A1; | |
int y2 = A2; | |
int x1 = A3; | |
int ledPin0 = 2; | |
int ledPin1 = 3; | |
int ledPin2 = 4; | |
int ledPin3 = 5; |
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 portName = '/dev/cu.AdafruitEZ-Link744f-SPP'; // fill in your serial port name here | |
var outByte1; // for outgoing data | |
var outByte2; | |
var outByte3; | |
var outByte4; | |
var slider1; | |
var slider2; |
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 redLed = 3; | |
int greenLed = 5; | |
int blueLed = 6; | |
int whiteLed = 9; | |
void setup() { | |
Serial.begin(9600); // initialize serial communications | |
Serial.setTimeout(10); // set the timeout for parseInt | |
pinMode(redLed, OUTPUT); |
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 ledPins[] = {3, 5, 6 }; //Red Green Blue pins going out to the LED from the arduino | |
int proxPin = A0; //Proximity sensor - increases voltage as your hand gets closer - controls HUE | |
int potPin = A1; //potentiometer for brightness control | |
int maxVal = 500; | |
int minVal = 180; | |
int latestVal; | |
int previousVal; | |
int bottomRange = 180; |
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; // Declare a "SerialPort" object | |
var proxPin = 0; // Variable from the Proximity Sensor | |
function preload() { | |
music = loadSound('youFlyMe.mp4'); //load sound from project folder | |
} | |
function setup() { | |
createCanvas(600, 400); |
OlderNewer