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 pinA = 2; // Connected to CLK on KY-040 | |
int pinB = 3; // Connected to DT on KY-040 | |
int encoderPosCount = 0; | |
int pinALast; | |
int aVal; | |
boolean bCW; | |
void setup() { | |
pinMode (pinA,INPUT); | |
pinMode (pinB,INPUT); |
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
// Red - 5V | |
// Black - GND | |
const int encoder_a = 2; // Green - pin 2 - Digital | |
const int encoder_b = 3; // White - pin 3 - Digital | |
long encoder = 0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(encoder_a, INPUT_PULLUP); | |
pinMode(encoder_b, INPUT_PULLUP); |
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 playerOneRot = 0.5; | |
float playerTwoRot = 0.5; | |
PVector ballPath = new PVector(); | |
PVector ballPos, ballVel; | |
float padX; | |
float padY; | |
void setup() { |
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
//use this... | |
for (int i = 0; i < images.length; i++) { | |
mainColors[i] = extractColorFromImage(images[i]); | |
} | |
//..to replace this | |
//mainColors[0] = extractColorFromImage(img1); | |
//mainColors[1] = extractColorFromImage(img2); | |
//mainColors[2] = extractColorFromImage(img3); | |
//mainColors[3] = extractColorFromImage(img4); | |
//mainColors[4] = extractColorFromImage(img5); |
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 playerOneRot = 0.5; | |
float playerTwoRot = 0.5; | |
PVector ballGo = new PVector(); | |
PVector ballPosition, ballVelocity; | |
void setup() { | |
size(800, 800); | |
ballPosition = new PVector(); | |
ballVelocity = new PVector(); |
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
//trying to get the screen to fill entirely with a column of random bars of color. | |
//The bars of color correspond to the dominant colors pulled from craigslist images. | |
PImage img1; | |
PImage img2; | |
PImage img3; | |
PImage img4; | |
PImage img5; | |
PImage img6; | |
PImage img7; |
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 gab.opencv.*; | |
import processing.video.*; | |
import java.awt.*; | |
int cameraResW = 1280; | |
int cameraResH = 720; | |
float scaleRatioW, scaleRatioH; | |
Capture video; | |
OpenCV opencv; |
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
/** | |
* Getting Started with Capture. | |
* | |
* Reading and displaying an image from an attached Capture device. | |
*/ | |
import processing.video.*; | |
Capture cam; |
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
// It would be a maze zing if April could figure this out. | |
Kite k; | |
void setup() { | |
size(700, 700); | |
smooth(); | |
bgGradient(); | |
cloudMaze(); | |
k = new Kite(); |
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
GsnapParam <- function(genome = GmapGenome(), unique_only = FALSE, | |
max_mismatches = NULL, | |
suboptimal_levels = 0L, mode = "standard", | |
use_snps = NULL, snpsdir = GmapSnpDirectory(genome), | |
npaths = if (unique_only) 1L else 100L, | |
quiet_if_excessive = unique_only, nofails = unique_only, | |
split_output = !unique_only, | |
novelsplicing = FALSE, splicing = NULL, | |
nthreads = 1L, part = NULL, batch = "2", ...) { | |
params <- formals(sys.function()) |
NewerOlder