Skip to content

Instantly share code, notes, and snippets.

View juliangoulding's full-sized avatar

juliangoulding

View GitHub Profile
@juliangoulding
juliangoulding / gist:5235180
Created March 25, 2013 06:02
I adapted the blink and button sketches to get the RGB led to change with each button pressed.
// set pin numbers:
const int buttonPin1 = 6; // the number of the pushbutton pin
const int ledPin1 = 11;
const int buttonPin2 = 3; // the number of the pushbutton pin
const int ledPin2 = 12; // the number of the LED pin
const int buttonPin3 = 2; // the number of the pushbutton pin
const int ledPin3 = 13;
const int buttonPin4 = 5; // the number of the pushbutton pin
const int buttonPin5 = 7; // the number of the pushbutton pin
@juliangoulding
juliangoulding / gist:5235186
Created March 25, 2013 06:03
This is the first part of the project and is an arduino that can auto tweet one of 5 predatemined phrases to is own twitter account depending on what buttons are pressed. It uses a button pad stolen out of a guitar hero controller, an ethernet shield ( in my case a combined etherten from freetronics) and the twitter header file to tweet all by i…
/*
This code is in the public domain.
*/
#include <SPI.h>
#include <Ethernet.h>
//#include <EthernetDNS.h> // only for IDE 0022 or earlier
#include <Twitter.h>
/*
CameraSweep.ino is an adaption of the sweep example sketch for use with the timesprint app.
Writen by Julian Gouldinng
*/
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
@juliangoulding
juliangoulding / gist:5315716
Created April 5, 2013 00:38
This is an adaption of a processing sketch on learningprocessing.com http://www.learningprocessing.com/exa... The code takes the average of all the movement and moves the ball towards it. Simple really. Check out all the code and try it fro yourself here. Please post video responses if you do something cool with it!
import processing.video.*;
Capture video;
PImage prevFrame;
float threshold = 150;
int Mx = 0;