Skip to content

Instantly share code, notes, and snippets.

View koji's full-sized avatar
🔍
I may be slow to respond.

koji koji

🔍
I may be slow to respond.
View GitHub Profile
@koji
koji / arduino.pde
Last active September 26, 2016 23:16
for arduino
import processing.serial.*;
Serial myPort;
String input;
int r = 0;
int g = 0;
int b = 0;
int loop_cnt =0;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
}
@koji
koji / analog.ino
Last active September 27, 2016 00:59
Arduino and Processing
int rgbR = A0;
int rgbG = A1;
int rgbB = A2;
int axisX = A3;
int axisY = A4;
int sType = A5;
// for color
int mapR=0;
int mapG=0;
function setup() {
createCanvas(720,480);
strokeWeight(2);
ellipseMode(RADIUS);
}
function draw() {
background(204);
// neck
PImage img;
float m,t;
void setup() {
size(500, 500);
noFill();
stroke(255);
strokeWeight(2);
m=0.0;
t=0.0;
@koji
koji / flocking3D
Created February 19, 2017 23:39 — forked from Craigson/flocking3D
nature of code example for flocking in 3D.
import peasy.*;
Flock flock;
int boundary = 500;
PeasyCam cam;
// GUI
import controlP5.*;
@koji
koji / flocking3D
Created February 19, 2017 23:39 — forked from Craigson/flocking3D
nature of code example for flocking in 3D.
import peasy.*;
Flock flock;
int boundary = 500;
PeasyCam cam;
// GUI
import controlP5.*;
@koji
koji / flocking3D
Created February 19, 2017 23:39 — forked from Craigson/flocking3D
nature of code example for flocking in 3D.
import peasy.*;
Flock flock;
int boundary = 500;
PeasyCam cam;
// GUI
import controlP5.*;
@koji
koji / flocking3D
Created February 19, 2017 23:39 — forked from Craigson/flocking3D
nature of code example for flocking in 3D.
import peasy.*;
Flock flock;
int boundary = 500;
PeasyCam cam;
// GUI
import controlP5.*;
@koji
koji / cameralist.pde
Created March 9, 2017 16:39
Get camera names
import processing.video.*;
Capture myCapture;
void setup() {
size(640, 480);
println(myCapture.list());
}
void draw() {