Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron P aaronparsekian

View GitHub Profile
View sketch.js
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() {
View sketch.js
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() {
View sketch.js
function setup() {
createCanvas(800, 800);
background(0);
frameRate(2400);
}
var m = false;
function draw() {
View four touch leds
int y1 = A0;
int x2 = A1;
int y2 = A2;
int x1 = A3;
int ledPin0 = 2;
int ledPin1 = 3;
int ledPin2 = 4;
int ledPin3 = 5;
View pong
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;
View four color
int y1 = A0;
int x2 = A1;
int y2 = A2;
int x1 = A3;
int ledPin0 = 2;
int ledPin1 = 3;
int ledPin2 = 4;
int ledPin3 = 5;
View rgbw
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;
View rgbw arduino
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);
View lamp
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;
View lamp p5
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);