Skip to content

Instantly share code, notes, and snippets.

@lisajamhoury
lisajamhoury / bezier-sketch.js
Created November 23, 2015 19:36
Human Performance 11-23-2015
var serial; // variable to hold an instance of the serialport library
var portName = '/dev/cu.usbserial-A703X44D'; // fill in your serial port name here
var myID = 0;
var heart = 0;
var breath = 0;
function setup() {
createCanvas(1920, 1080);
@lisajamhoury
lisajamhoury / receiver.ino
Created November 30, 2015 23:27
ICM Final Presentation: This sketch creates projections from pulse input from a Polar heart sensor
#include <RFM69.h>
#include <SPI.h> // the RFM69 library uses SPI
int ledPin = 9;
RFM69 radio;
#define myFrequency RF69_915MHZ // or RF69_433MHZ (check your radio)
@lisajamhoury
lisajamhoury / index.html
Created February 1, 2016 01:51
Code for Live Web Video Self Portrait (http://lmj.io/projects/live-web/selfportrait/)
<html>
<head>
<title>Self Portrait</title>
<style type="text/css">
body, #summer, #winter { margin:0; padding: 0; width: 100%}
#summer, #winter {display: none;}
</style>
<script type="text/javascript">
//listens for page load, calls init upon load
@lisajamhoury
lisajamhoury / MyBurst.cs
Created February 17, 2016 15:11
Code samples from ITP Sensory Storytelling assignment two: particles
using UnityEngine;
using System.Collections;
public class MyBurst : MonoBehaviour {
ParticleSystem ps;
// Use this for initialization
void Start () {
ps = GetComponent<ParticleSystem> ();
var em = ps.emission;
// HTTP Portion
var http = require('http');
var fs = require('fs'); // Using the filesystem module
var Twitter = require('twitter');
var httpServer = http.createServer(requestHandler);
httpServer.listen(8000);
var io = require('socket.io').listen(httpServer);
@lisajamhoury
lisajamhoury / socketserver.js
Created February 27, 2016 22:11
PeerJS not working
// Use the http module: http://nodejs.org/api/http.html
var https = require('https');
var fs = require('fs');
var url = require('url');
var options = {
key: fs.readFileSync('my-key.pem'),
cert: fs.readFileSync('my-cert.pem')
};
@lisajamhoury
lisajamhoury / socket-particle.cs
Created February 29, 2016 18:48
Script to make particle burst on socket, doesn't work!
#region License
/*
* TestSocketIO.cs
*
* The MIT License
*
* Copyright (c) 2014 Fabio Panettieri
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@lisajamhoury
lisajamhoury / p5.kinect2.js
Last active August 6, 2016 03:02
p5 kinect2 library -- getting started
var Peer2 = require('peerjs');
// require("script!../js/p5.min.js");
// require("script!../js/p5.dom.js");
/*! p5.kinect2.js v0.0.1 2015-07-23 */
/**
* @module p5.kinect2
* @submodule p5.kinect2
* @for p5.kinect2
* @main
/*! p5.kinect2.js v0.0.1 2015-07-23 */
/**
* @module p5.kinect2
* @submodule p5.kinect2
* @for p5.kinect2
* @main
*/
/**
* p5.kinect2
* Shawn Van Every (Shawn.Van.Every@nyu.edu)
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "LeftSensor.hpp"
#include "RightSensor.hpp"
#include "PulseSensor1.hpp"
#include "PulseSensor2.hpp"
//#include "cinder/params/Params.h"
using namespace ci;