Skip to content

Instantly share code, notes, and snippets.

View lmccart's full-sized avatar
🍊

Lauren Lee McCarthy lmccart

🍊
View GitHub Profile
#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;
#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
#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] = {
#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] = {
#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] = {
function setup() {
$('#something').hide();
$('#blah').fadeIn();
$('#mybutton').click(function() {
background(random(255));
})
}
function draw() {
ellipse(width/2 height/2, 50, 50);
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');
var x = 30;
var y = 30;
function setup() {
createCanvas(400, 600);
background(0);
}
function mousePressed() {
ellipse(x, y, 20, 20);
<!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);
// 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');