Wednesday, February 10, 2010

Last week in Interactive Exhibit Design we were playing with firmata, or so we thought. Braden, Jordan and I set up a circuit, first with a button press as shown below and the following two codes run separately on Arduino and Processing (which should have been our first hint that we were not actually sucessfully using firmata), then with the same two codes and a potentiometer.

Our button circuit connected to the Arudino

The potentiometer circuit. The gator clips were unwieldly but much easier to use.




Processing Code: Many Thanks to Tom Igoe
/*
Sensor Graphing Sketch
 This sketch takes raw bytes from the serial port at 9600 baud and graphs them.
 Created 20 April 2005
 Updated 5 August 2008
 by Tom Igoe
 */
import processing.serial.*;
Serial myPort;        // The serial port
int graphXPos = 1;    // the horizontal position of the graph:
void setup () {
  //size(400, 300);        // window size
  size(800,100);
  // List all the available serial ports
  println(Serial.list());
  // I know that the fisrt port in the serial list on my mac
  // is usually my Arduino module, so I open Serial.list()[0].
  // Open whatever port is the one you're using.
  myPort = new Serial(this, Serial.list()[0], 9600);
  // set inital background:
  background(48,31,65);
}
void draw () {
  // nothing happens in draw.  It all happens in SerialEvent()
}
void serialEvent (Serial myPort) {
  // get the byte:
  int inByte = myPort.read(); 
    // print it:
  println(inByte);
  // set the drawing color. Pick a pretty color:
  stroke(123,189,158);
  // draw the line:
  line(graphXPos, height, graphXPos, height - inByte);
  // at the edge of the screen, go back to the beginning:
  if (graphXPos >= width) {
    graphXPos = 0;
    // clear the screen:
    background(48,31,65); 
  } 
  else {
    // increment the horizontal position for the next reading:
    graphXPos++;
  }
}
Arduino Code: Thanks DojoDave!
/* Basic Digital Read
 * ------------------ 
 *
 * turns on and off a light emitting diode(LED) connected to digital  
 * pin 13, when pressing a pushbutton attached to pin 7. It illustrates the
 * concept of Active-Low, which consists in connecting buttons using a
 * 1K to 10K pull-up resistor.
 *
 * Created 1 December 2005
 * copyleft 2005 DojoDave <http://www.0j0.org>
 *
 */
int ledPin = 13; // choose the pin for the LED
int inPin = 7;   // choose the input pin (for a pushbutton)
int val = 0;     // variable for reading the pin status
void setup() {
  pinMode(ledPin, OUTPUT);  // declare LED as output
  pinMode(inPin, INPUT);    // declare pushbutton as input
}
void loop(){
  val = digitalRead(inPin);  // read input value
  if (val == HIGH) {         // check if the input is HIGH (button released)
    digitalWrite(ledPin, LOW);  // turn LED OFF
  } else {
    digitalWrite(ledPin, HIGH);  // turn LED ON
  }
}

When we connected the potentiometer we saw this:



Unfortunately through all of this we thought we were using Firmata, a firmware that can be uploaded to the arduino to allow Processing to talk directly to it without having to run two programs at once. As anyone who knows this stuff can see, we weren’t. The first and biggest hint is that we were running both Arduino and Processing to make our visualization work. What we did learn is that firmata is much harder to get working than we had thought!

Tuesday, February 9, 2010

At long last, the ideas!


I started thinking about my potential Interactive Exhibit Design projects after classes ended last semester. Right away I latched onto the idea of the problems of exhibiting oral history. I’ve always found that oral history exhibits and audio tours can make museum visits a very individual experience. Moreover, I have yet to find an audio guide that provides a seamless experience, most like the Metropolitan Museum of Arts WiFi mobile device formatted website require you to browse to the exhibit you’re interested in, enter an exhibit number, or plug a rented unit into a slot on the wall. My hope was to at least come up with a great idea for creating a seamless, group oral history experience. As yet I haven’t been able to come up with anything that I think could actually work, so I’ve moved on to a few more realistic projects. 
The first project that I want to complete after reading week (next week) is a google SketchUp model of a company house, probably from Glace Bay or New Waterford. It will depend on which I can find the most archival information on while I’m home in Nova Scotia for a few days and can visit NSARM. Worst case scenario I may be able to ask a friend of mine who is a volunteer firefighter in Glace Bay if he has access to the fire insurance plans. I’m mostly interested in this project because I want to learn how to use SketchUp as it is, from what I’ve heard, rapidly becoming an industry standard.
Another project I’ve been thinking about involves a gps enabled audio walking tour. I’d like to program an arduino with a gps shield and an attached mp3 player. The idea is to create a seamless audio tour based on the London Public Library’s Walking Guide to Historic Sites in London. I’ll need to learn arduino gps code and I’ll have to figure out how to connect an mp3 player to the arduino (if there isn’t already a shield for that I just haven’t found yet). I’d also like to eventually learn how to code for the iPhone or another smartphone to potentially make this a mobile app.
The final project I’d like to work on is the project that until recently I’ve been using to procrastinate on the rest of my projects. When we started playing with sensors in class I got it into my head that I’d like to design a wifi enabled sensor that would tell me when I need to fill my cats’ water dish. The project would involve a level sensor of some sort and a code that would, when the alarm on the sensor was tripped, email or tweet to let me know. For this project I’ll need to work with an arduino, a sensor, and a wifi shield. My father and I have talked about this project a bunch and we’ve got a pretty good idea of what sort of sensor I’d need, but I’ll talk about that in a later post.
Throughout all of this, I’m also considering doing some research probably on Nova Scotian labour/environmental history (perhaps the tar ponds and the Sydney Steel Plant) and I’d like to put together one or more podcasts with GarageBand. I very recently started playing with GarageBand making a ringtone and it was fun and relatively simple. I think it would  be really interesting to try recording and cutting together a podcast.
A final project I’ve considered and scrapped was a game that I wanted to eventually code for the iPhone. I scrapped the idea for two reasons, the first was that I wasn’t prepared to hand draw it or draw it in processing, the second, I was beginning to feel like I couldn’t adequately do the other ideas I had and I was much more interested in pursuing them.
I’ll post more details on the projects and where I am with them thus far as soon as possible. I’ll also be posting with more detail regarding some of the things we’ve done in class and some video we shot last week.

Interactive Exhibit Design: A First Foray

Part of my Interactive Exhibit Design (IED) class this semester is blogging about my ideas, projects, and progress. Up until now, I’ve been really hesitant to do that despite the fact that it is a course component. I’m not totally sure why I was so reluctant to blog but I think it probably had a lot to do with the fact that until very recently I really wasn’t sure what I wanted to do for my project(s) and the fact that I didn’t until perhaps two weeks ago feel all that confident in my skills and ability to actually make my ideas happen. It also probably helps that Dr. Turkel gave me the go ahead to actually finish the project I had been using to procrastinate. 

I think the most incredible thing about IED is the world that the class is opening for myself and my classmates. Things that we might not have ever thought about doing are approachable now. We can create virtual 3D landscapes, make a hockey game into an interface and make a t-shirt do something cool. We’re also learning what we can and cannot do ourselves (thought I’m still holding out hope for Objective C). We’ll know when we need to call in the professionals and when we’re the only professionals our employers need. Its exciting, uplifting and empowering! 
I’ll be following this post up with a description of the projects I’m interested in working on, including what I think I’ll need, what I need to learn, and what I think the final product might look like.