Skip to content

Instantly share code, notes, and snippets.

View foundations-final-template-simple.html
<!DOCTYPE html>
<html>
<head>
<title>My final project | Foundations | Pratt SAVI</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<link href="https://carto.com/developers/carto-js/examples/maps/public/style.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Noto+Serif+JP|Open+Sans" rel="stylesheet">
<style>
@sighrobot
sighrobot / foundations-final-template.html
Last active Sep 17, 2018
Final project HTML template for SAVI Pratt Foundations
View foundations-final-template.html
<!DOCTYPE html>
<html>
<head>
<title>My final project | Foundations | Pratt SAVI</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->
@sighrobot
sighrobot / gist:7934521
Created Dec 12, 2013
Generates layers of triangles with semi-random dimensions
View gist:7934521
int i = 0;
int j = 0;
boolean run = true;
void setup() {
background(#ffffff);
size(600, 600);
frameRate(1000);
@sighrobot
sighrobot / soundkites.ino
Last active Dec 30, 2015
Sound Kites FINAL PCOMP 2013
View soundkites.ino
// Introduction to Physical Computing - ITP - NYU
// Fall 2013 - Tom Igoe
// Final project - Sound Kites
// Abe Rubenstein + Yu Ji
// ARDUINO
// sensor values
int s1 = 0;
int s2 = 0;
int s3 = 0;
@sighrobot
sighrobot / soundkites.pde
Last active Dec 30, 2015
Sound Kites FINAL PCOMP 2013
View soundkites.pde
// Introduction to Physical Computing - ITP - NYU
// Fall 2013 - Tom Igoe
// Final project - Sound Kites
// Abe Rubenstein + Yu Ji
// PROCESSING
import ddf.minim.*;
import processing.serial.*;
Minim minim;
View ColorFluteV2
// Introduction to Physical Computing - ITP - NYU
// Fall 2013 - Tom Igoe
// Midterm Project - Color Flute
// Abe Rubenstein + Yu Ji
// PROCESSING
import processing.serial.*;
Serial port;
View ColorFluteSensorTest
// Introduction to Physical Computing - ITP - NYU
// Fall 2013 - Tom Igoe
// Midterm Project - Color Flute
// Abe Rubenstein + Yu Ji
// ARDUINO
// global variables for raw sensor values
int photo1 = 0; // photoresistor 1 (red)
int photo2 = 0; // photoresistor 2 (green)
View ping_scale
/* Ping))) Sensor
This sketch reads a PING))) ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
* +V connection of the PING))) attached to +5V
View _3_speed_blinking
long previousMillis = 0; // store last time LED was updated
long interval = 100; // blink interval (milliseconds)
void setup() {
pinMode(2, INPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
digitalWrite(4, HIGH); // start with one LED on
View gist:f3fae647dec7d8fffc31
var levels = 'LEVEL DATA';
var ready= false;
var WebSocket = require('ws'),
ws = new WebSocket('ws://hidden-fortress-3752.herokuapp.com');
ws.on('open', function() {
console.log('open function fired!')
ws.send('Arduino here!' );
ready = true;