Skip to content

Instantly share code, notes, and snippets.

View Craigson's full-sized avatar

Craig Pickard Craigson

View GitHub Profile
@Craigson
Craigson / gist:252c511ebcfea991a400
Created October 18, 2014 20:36
push button grid prototype
//P-comp midterm
//Instagram grid-button prototype
//5 October 2014
//Craig Pickard and Minju Viviana Kim
//assign variables for each button that represents a tile in the grid
const int button1 = 2;
const int button2 = 3;
const int button3 = 4;
const int button4 = 5;
@Craigson
Craigson / gist:9ffbb3e60af4e6a92ff8
Created October 20, 2014 20:33
Instagram Interface Prototype - Combining sensor data
//P-comp midterm
//Instagram grid-button prototype
//5 October 2014
//Craig Pickard and Minju Viviana Kim
//------------------------------------------------------------------
//declare global variables for button system
//assign variables for each button that represents a tile in the grid
const int button1 = 2;
@Craigson
Craigson / gist:89a119425c245a081400
Created October 23, 2014 01:46
Instagram TUI - Arduino Code
//P-comp midterm
//Instagram grid-button prototype
//5 October 2014
//Craig Pickard and Minju Viviana Kim
//------------------------------------------------------------------
//declare global variables for button system
//assign variables for each button that represents a tile in the grid
const int button1 = 2;
@Craigson
Craigson / gist:08e356f3fdf9d5448b36
Created October 23, 2014 01:49
Instagram TUI - Processing Application
/*
Physical Computing Mid Term Project.
Craig Pickard and Minju Vivian Kim
ITP 2014
Physical Interface for Interacting with your Instagram Account.
*/
import http.requests.*; //import http request library to get instagram photo
import processing.serial.*; //import serial library
@Craigson
Craigson / gist:7173775644387006fb16
Created November 9, 2014 21:01
Temboo library for twitter - trying to get a JSONArray
//statuses > text (location for text of status)
//statuses > entities > hashtags > text (location of the hashtags it contains)
//statuses > user > screen_name (location of the user name)
//import x-number of tweets from twitter
//store each tweet as an object
//create particle for each tweet
//store user ID
//store location
//store date
@Craigson
Craigson / gist:1b205f1a0a345604d38e
Created November 10, 2014 20:39
soundball Javascript file
//set boolean variables for toggling size chang and colour change
var changeColour = false;
var changeSize = false;
var x,y;
var input;
var analyser;
{
"Arsenal FC":{
"Year Founded":1886,
"Kit Sponser":"Puma",
"Honours":[
{
"Competition":"League Title",
"Number of titles":13,
"Years":[
1931,
@Craigson
Craigson / gist:ab5bd1967829b4153126
Created November 26, 2014 04:10
accelerometer code
#include <Average.h>
int sensorValueX;
int sensorValueY;
#define count 10
int xArray[count];
int yArray[count];
@Craigson
Craigson / README.md
Last active August 29, 2015 14:10 — forked from robynitp/README.md

Networked Media Week 5 Assignment

Craig Pickard

I followed the instructions to create a simple web server using Servi. The examples of server_v1.js and server_v2.js were good introductions for understanding the use of Route(), but I ran into some trouble when I was trying to access data inside of the object that I created.

The basic premise of the site is that it's a page for a sports team. I'm an avid football (soccer) supporter, so I created a VERY rudimentary page for Aresnal FC, who are based in London, England. The site has a simple homepage and a simple about page. I then created a simple HTML template for displaying the player profiles. The javascript file contains a JSON object that stores the data for each player. I then used "route('/profiles/:playerName', showProfiles);" as a way to display each players profile.

At present, the server is not working as terminal keeps reporting the following error when i try and run "node server_v3.js":

/root/server_v3.js:57

var servi = require('servi');
var app = new servi(true);
port(3005);
// example dynamic route:
//route('/vegetables/:vegname',myFunction);
route('/',showHome);