Skip to content

Instantly share code, notes, and snippets.

@lilyszajn
lilyszajn / Saving floats to a string attempt
Created April 25, 2012 17:55
Saving floats to a string attempt
import processing.net.*;
import SimpleOpenNI.*; //middleware to execute skeleton tracking
SimpleOpenNI kinect;
import java.lang.Runtime;
import processing.video.*; //to run the intro video
int[] userMap;
PImage backgroundImage; //background image
PVector prevRightHandLocation;
void checkSection1() {
if (key == 'a' || key == 'A' || key == 'b' || key == 'B' || key == 'c' || key == 'C' || key == 'd' || key == 'D' || key == 'e' || key == 'E') {
answers.add("" + key);
answerCounter++; //add to the answer counter
if (answers.size() > 0) {
String q1 = (String)answers.get(answerCounter);
println("answer counter" + answerCounter);
println(answers + "key" + key);
}
@lilyszajn
lilyszajn / Scanning_Kinect
Created March 29, 2012 20:52
Scanning for Fabrication using Kinect
import processing.opengl.*;
import unlekker.util.*;
import unlekker.modelbuilder.*;
import SimpleOpenNI.*;
SimpleOpenNI kinect;
boolean scanning = false;
int spacing = 3;
UGeometry model;
UVertexList vertexList;
void setup() {
@lilyszajn
lilyszajn / Gymfo webpage
Created December 9, 2011 03:10
Gymfo webpage
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Gymfo</title>
<link href="/stylesheets/main.css?1294205065" media="all" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=0.50, user-scalable=yes">
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Lily Szajnberg">
@lilyszajn
lilyszajn / Gymfo xbee code
Created December 9, 2011 03:09
Gymfo xbee code
int temperatureCommand = B00000011; // command used to read temperature
int humidityCommand = B00000101; // command used to read humidity
int analogPinTemp = 10;
int analogPinHumidity = 11;
int clockPin = 8; // pin used for clock
int dataPin = 9; // pin used for data
int ack; // track acknowledgment for errors
int val;
@lilyszajn
lilyszajn / highfiver
Created October 27, 2011 16:18
how do i make these as a timeline??
<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-1.4.2.min.js" ></script>
<script>
var apikey = "2794b427c3570f8b21835f18368f407a";
var photoid = "results.doc.photoid";
$(window).load(function()
@lilyszajn
lilyszajn / Simple Sensor Network
Created October 25, 2011 20:27
Simple Sensor Network with Xbees Series 2 for P5
/*
* Draws a set of thermometers for incoming XBee Sensor data
* by Rob Faludi http://faludi.com
*/
// used for communication via xbee api
import processing.serial.*;
// xbee api libraries available at http://code.google.com/p/xbee-api/
// Download the zip file, extract it, and copy the xbee-api jar file
@lilyszajn
lilyszajn / High Five Ruby App
Created October 24, 2011 18:57
High Five Ruby app with jquery
require 'rubygems'
require 'sinatra'
require 'open-uri'
get "/highFive.jsonp" do
content_type :jsonp
open("http://www.itpcakemix.com/project/HI5SON!!").read
end
get "/" do
@lilyszajn
lilyszajn / gist:1293193
Created October 17, 2011 17:34 — forked from atduskgreg/gist:1292973
example of getting a flickr photo url with jquery from the id
var apikey = "2794b427c3570f8b21835f18368f407a"
var photoid = "results.doc.photoid"
var flickrUrl = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+ apikey+"&photo_id="+ "6254305259" +"&format=json&jsoncallback=?"
$(window).load(function () {
$.getJSON(flickrUrl, function(data){
// console.log(data.sizes.size[3].source);
console.log(data);
console.log(results.doc)
//var results = data.rows;
@lilyszajn
lilyszajn / WLD Femur Measurement
Created April 14, 2011 17:00
Arduino Code for Femur Measurement Interactive at AMNH
//**************************************************************//
// Name : Femur Measurement Interactive
// Author : Cameron Browning, American Museum of Natural History Exhibit Media Dept.
// Date : 17 Mar, 2011
// Modified: 28 Mar 2011
// Version : 2.0
// Notes : Shifts out to Daisy Chained TPIC6C595s on
// : The AMNH BDD 1.5 Ciruit boards
//****************************************************************