Paja

Icon

Rapid prototyping for music, art and design work

Paper Plane Pilot

plane1

Course project by Heidi Holm & Daniel Suominen – Designing Interaction with Electronics workshop 2009 at Mlab, Helsinki

Paper Plane Pilot

Day 1: Developing the idea. A simple game where you pilot a paper plane through the Media Lab. The controlling of the plane involves hand gestures and blowing air from your mouth. This is achieved by using accelerometer and air sensor.

Day 2: Establishing rules. Four axis’ to control – two for each hand. Alone or in combination these will control the pitch, yaw and roll.

Day 3: Electronics and programming. We have built up the electronic set up and it is working fine. We also managed to get the values through to flash but only one axis at a time by pressing a button. Our aim is to get the sensor data for all four axis’ constantly  so that controlling of the content would be a continuous experience. So far also the content has been filmed and the paper plane has been built. Oh yeah.

Day 4: After several hours of coding and help from Michi and Touko and thanks to Heidi’s patience we finally are getting all four axis’s data through. The next step is to find out how to map these values to the x and y of the video position. By completing this we would have the basic function of the game ready. Meanwhile I have been trying to figured what would be the best set up for the interface. At the moment we have two small boards where we have a socket for the accelerometer and four wires going to the central unit. It would be nice to build a wing shaped case for the sensors in order to give more literal meaning for the control units.

Day 4 18.50: IT’S WORKING!!! We are controlling the video with our hands. The rules of the game also start to take a shape as we now know the physical experience of controlling the plane. It is somewhat meditative feeling while you try to hold the plane in the middle of the corridor that you are advancing along. This is probably the key rule in our game; keep the plane in the middle, if you get too close to the walls, floor or ceiling the game ends. I guess at this point it is safe to say that we are not implementing the air sensor idea.

pplane1pplane2pplane3pplane4

Day 5: Schematics below:

Schematic

Hand gestures used in controlling the plane:

up

up

down

down

left

left

right

right

UI

UI

A special flying glove designed by Daniel:

a flying glove

a flying glove

Paper Plane Pilot Demo video

Arduino code:

#include <Messenger.h>

// 2009 mlab.uiah.fi/paja
// Connecting to PC
// PC <-> Arduino with Messenger library

/*
*** Protocal using Messenger Arduino library.
Send following string from PC as a command.
Each string needs to end with carrige return (13 in ASCII)

– Read analog values: r a [a/d (pin)] [pin]
(e.g. “r a d 7”)
– Read digital pins: r d [pin]
(e.g. “r d 6”)
– Write digital pin: w d [pin] [value]
(e.g. “w a 9”)
– Write analog pins: w a [pin] [value]
(e.g. “w d 12”)
*/

// download the library from following URL
// arduino.cc/playground/Code/Messenger
//
// Copy the library folder following location
// Arduino.app > (Show package contents) >
// Contents > Resources > Java > hardware > libraries

// Inport Messenger library
// Instantiate Messenger object with the default separator
// (the space character)
Messenger message = Messenger();

///*** Import additional library if needed ***///
// #include <***.h>

// Pins
int MemsicLeftXPin = 6;
int MemsicLeftYPin = 7;
int MemsicRightXPin = 8;
int MemsicRightYPin = 9;

///*** Main functions ***///
void setup(){
// Start serial communication
Serial.begin(9600);
// Attach the callback function to the Messenger
message.attach(messageReady);

// Blink a Led three times when Arduino is ready to connect
blinkLed();
blinkLed();
blinkLed();
}

void loop(){
// The following line is the most effective way of using
// Serial and Messenger’s callback
while (Serial.available())  message.process(Serial.read () );
}

///*** Blinking a LED when you need to monitor ***///
void blinkLed(){
int pin = 13;
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
delay(100);
digitalWrite(pin, LOW);
delay(100);
}

///*** Reading incoming values ***///
void messageReady(){
// Checks to see if the message is complete
if (message.available()){
// read first char
if (message.readChar() == ‘r’){
readValue();
//Serial.println(“ok”);
}
}
}

void readValue(){
int value;
int pulseVal;

pulseVal = pulseIn(MemsicLeftYPin, HIGH);
// calculating the pulse to 1/1000 g
value = ((pulseVal / 10) – 500) * 8;
Serial.print(value);
Serial.print(‘ ‘);

pulseVal = pulseIn(MemsicLeftXPin, HIGH);
// calculating the pulse to 1/1000 g
value = ((pulseVal / 10) – 500) * 8;
Serial.print(value);
Serial.print(‘ ‘);

pulseVal = pulseIn(MemsicRightYPin, HIGH);
// calculating the pulse to 1/1000 g
value = ((pulseVal / 10) – 500) * 8;
Serial.print(value);
Serial.print(‘ ‘);

pulseVal = pulseIn(MemsicRightXPin, HIGH);
// calculating the pulse to 1/1000 g
value = ((pulseVal / 10) – 500) * 8;
Serial.print(value);

// termintates string by a linefeed
Serial.println();
}

Facebook Twitter Email

Category: Media Lab Helsinki, Student Projects

Tagged:

One Response

  1. […] and Anusha Lyer 3. Elle E. Dee & The Electrotastics by Jonathan Cremieux & Juha Salonen 4. Paper Plane Pilot by Heidi Holm & Daniel Suominen 5. Interactive shadow theater by Svetlana Maras and Leyla […]

Social links powered by Ecreative Internet Marketing