Skip to content

Instantly share code, notes, and snippets.

View rhathaway's full-sized avatar

Rebecca Hathaway rhathaway

View GitHub Profile
@rhathaway
rhathaway / wunderground_notworking.pde
Created December 3, 2011 19:53
wunderground in processing - not working
import com.francisli.processing.http.*;
HttpClient client;
void setup() {
client = new HttpClient(this, "api.wunderground.com");
client.GET("/api/[api_key]/conditions/q/CA/San_Francisco.json");
}
void responseReceived(HttpRequest request, HttpResponse response) {
@rhathaway
rhathaway / wunderground.pde
Created December 3, 2011 22:33
wunderground api data in processing
import com.francisli.processing.http.*;
HttpClient client;
void setup() {
client = new HttpClient(this, "api.wunderground.com");
client.GET("/api/[api_key]/conditions/q/CA/San_Francisco.json");
}
void responseReceived(HttpRequest request, HttpResponse response) {
@rhathaway
rhathaway / wunderground_display.pde
Created December 8, 2011 02:28
wunderground in processing - display
import com.francisli.processing.http.*;
PFont cityFont, timeFont, weatherFont;
PImage backgroundImg;
PImage conditionImg;
PImage windImg;
String locationInfo, currentTime, currentConditions;
float tempF, tempC;
@rhathaway
rhathaway / wunderground4cities.pde
Created December 11, 2011 21:24
wunderground in processing with data for 4 cities
import com.francisli.processing.http.*;
PFont cityFont, timeFont, weatherFont;
PImage backgroundImg;
PImage conditionImg;
PImage windImg;
String locationInfo, currentTime, currentConditions, iconURL, wind, windDirection;
float tempF, tempC, windSpeed;
@rhathaway
rhathaway / Glyph.pde
Created December 12, 2011 06:31
twitter glyphs WIP #1
class Glyph {
int x, y, glyphsize;
Glyph() {
x = 10;
y = 10;
glyphsize = 10;
}
void paint(int i) {
@rhathaway
rhathaway / Glyph.pde
Created December 13, 2011 00:15
wunderground + twitter in processing
class Glyph {
int x, y, glyphsize;
Glyph() {
x = 410;
y = 50;
glyphsize = 10;
}
void paint(int i) {
@rhathaway
rhathaway / sendButtonPress.pde
Created December 13, 2011 05:57
wunderground + buttons
// modified sample from Programming Interactivity, p.262
int HNLbutton = 2;
int SFObutton = 4;
int CHIbutton = 6;
int NYCbutton = 8;
void setup() {
// open the serial port at 9600 bps:
Serial.begin(9600);
@rhathaway
rhathaway / simplebuttonpress.pde
Created December 14, 2011 00:37
button presses from arduino
import processing.serial.*;
Serial arduinoPort;
String oldValue;
PFont cityFont, timeFont, weatherFont;
PImage backgroundImg;
PImage conditionImg;
PImage windImg;
@rhathaway
rhathaway / wunderground_buttons_error.pde
Created December 14, 2011 02:45
wunderground + buttons: memory error
import com.francisli.processing.http.*;
import processing.serial.*;
Serial arduinoPort;
String oldValue;
PFont cityFont, timeFont, weatherFont;
PImage backgroundImg;
PImage conditionImg;
PImage windImg;
@rhathaway
rhathaway / wunderground_buttons_serialevent_error.pde
Created December 14, 2011 04:30
wunderground + buttons again
import com.francisli.processing.http.*;
import processing.serial.*;
Serial myPort; // arduino port
String oldValue;
PFont cityFont, timeFont, weatherFont;
PImage backgroundImg;
PImage conditionImg;
PImage windImg;