This file contains hidden or 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
#include "ofApp.h" | |
#include "RtAudio.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup() { | |
//causes null ptr later on during an audio call back | |
//for (int i = 0; i < soundDevices.size(); i++) | |
//{ | |
// ofLog() << "FOUND " << soundDevices[i].deviceID << soundDevices[i].name; |
This file contains hidden or 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
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd1(12, 11, 16, 17, 18, 19); | |
LiquidCrystal lcd2(12, 5, 6, 7, 8, 9); | |
LiquidCrystal lcds[2] = { lcd1, lcd2 }; | |
int leds[2] = { 2, 10 }; | |
// wedding |
This file contains hidden or 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
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd1(12, 11, 16, 17, 18, 19); | |
LiquidCrystal lcd2(12, 5, 6, 7, 8, 9); | |
LiquidCrystal lcds[2] = { lcd1, lcd2 }; | |
int leds[2] = { 2, 10 }; | |
static String cues[60] = { |
This file contains hidden or 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
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd1(12, 11, 16, 17, 18, 19); | |
LiquidCrystal lcd2(12, 5, 6, 7, 8, 9); | |
LiquidCrystal lcds[2] = { lcd1, lcd2 }; | |
int leds[2] = { 2, 10 }; | |
static String cues[60] = { |
This file contains hidden or 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
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd1(12, 11, 16, 17, 18, 19); | |
LiquidCrystal lcd2(12, 5, 6, 7, 8, 9); | |
LiquidCrystal lcds[2] = { lcd1, lcd2 }; | |
int leds[2] = { 2, 10 }; | |
static String cues[60] = { |
This file contains hidden or 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
function setup() { | |
$('#something').hide(); | |
$('#blah').fadeIn(); | |
$('#mybutton').click(function() { | |
background(random(255)); | |
}) | |
} | |
function draw() { | |
ellipse(width/2 height/2, 50, 50); |
This file contains hidden or 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
this.throb = function(amp) { | |
if (amp) { | |
// do something | |
// like log the amp passed in | |
console.log(amp); | |
} | |
else { | |
// do something else | |
// like return the number 10 | |
console.log('this function was called with no arguments'); |
This file contains hidden or 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
var x = 30; | |
var y = 30; | |
function setup() { | |
createCanvas(400, 600); | |
background(0); | |
} | |
function mousePressed() { | |
ellipse(x, y, 20, 20); |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.23/p5.js"></script> | |
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script> | |
<script> | |
var socket = io(); | |
socket.on('position', function(msg){ | |
fill(0); | |
ellipse(msg.x, msg.y, 15, 15); |
This file contains hidden or 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
// Explained in tutorial here: http://socket.io/get-started/chat/ | |
// 1. Install socket.io module: "npm install socket.io" | |
// 2. Install express module: "npm install express" | |
var app = require('express')(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); | |
app.get('/', function(req, res){ | |
res.sendfile('public/index.html'); |