Ghost Project  Tales of Grim-ITP winter show

Tuesday, November 28, 2006

floor plan for Sun's room

dollhouse prototype with mini-arduino





Sunday, November 26, 2006

dollhouse arduino prototype


The first prototype with Arduino



The second prototype with Arduino

Book code
-----------------------------------------------------

int storyFirstSensor = 2;
int storySecondSensor = 3;
int storyThirdSensor = 4;
int storyFourthSensor = 5;
int storyFirstVal = 0;
int storySecondVal = 0;
int storyThridVal = 0;
int storyFourthVal = 0;
int roomFirstOutput = 6; // First room
int roomSecondOutput = 7; // Seond room
int roomThridOutput = 8; // Third room
int roomFourthOutput = 12; // Fourth room

void setup()
{
Serial.begin(9600); // use the serial port to send the values back to the computer
pinMode(storyFirstSensor,INPUT);
pinMode(storySecondSensor,INPUT);
pinMode(storyThirdSensor,INPUT);
pinMode(storyFourthSensor,INPUT);
pinMode(roomFirstOutput,OUTPUT);
pinMode(roomSecondOutput,OUTPUT);
pinMode(roomThridOutput,OUTPUT);
pinMode(roomFourthOutput,OUTPUT);
}

void loop()
{
storyFirstVal = digitalRead(storyFirstSensor);
storySecondVal = digitalRead(storySecondSensor);
storyThridVal = digitalRead(storyThirdSensor);
storyFourthVal = digitalRead(storyFourthSensor);

if (storyFirstVal == LOW) {
digitalWrite(roomFirstOutput, HIGH);
digitalWrite(roomSecondOutput, LOW);
digitalWrite(roomThridOutput, LOW);
digitalWrite(roomFourthOutput, LOW);
Serial.println ("Turning on light in the First Room");
}
else if (storySecondVal == LOW) {
digitalWrite(roomFirstOutput, LOW);
digitalWrite(roomSecondOutput, HIGH);
digitalWrite(roomThridOutput, LOW);
digitalWrite(roomFourthOutput, LOW);
Serial.println("Turning on light in the Second Room");
}
else if (storyThridVal == LOW) {
digitalWrite(roomFirstOutput, LOW);
digitalWrite(roomSecondOutput, LOW);
digitalWrite(roomThridOutput, HIGH);
digitalWrite(roomFourthOutput, LOW);
Serial.println("Turning on light in the Third Room");
}
else if (storyFourthVal == LOW) {
digitalWrite(roomFirstOutput, LOW);
digitalWrite(roomSecondOutput, LOW);
digitalWrite(roomThridOutput, LOW);
digitalWrite(roomFourthOutput, HIGH);
Serial.println("Turning on light in the Fourth Room");
}
else {
digitalWrite(roomFirstOutput, LOW);
digitalWrite(roomSecondOutput, LOW);
digitalWrite(roomThridOutput, LOW);
digitalWrite(roomFourthOutput, LOW);
Serial.println("Turning off & on light in all Rooms");
}

}




Sun's Room code
-----------------------------------------------------

//the H bridge takes two inputs from the Arduino to control the motor.
int motorPin0 = 2;
int motorPin1 = 3;
int enPin = 7; // enable pin
// there is one switch
int switchPin = 5;
int ledPin=6;
//declare the state variable
int state = 0;

void setup() {
//the motor control wires are outputs
pinMode(motorPin0, OUTPUT);
pinMode(motorPin1, OUTPUT);
pinMode(enPin, OUTPUT);
pinMode(ledPin, OUTPUT);
//the switch is an input
pinMode(switchPin, INPUT);
}

void loop() {
//read the switch
state = digitalRead(switchPin);
//based on the state of the switch alternate the control pins to change he direction of the motor.
switch (state){
case 0:
digitalWrite(enPin, LOW);
digitalWrite(motorPin0, LOW);
digitalWrite(motorPin1, LOW);
digitalWrite(ledPin, LOW);
break;
case 1:
digitalWrite(ledPin, HIGH);
digitalWrite(enPin, HIGH);
digitalWrite(motorPin0, LOW);
digitalWrite(motorPin1, HIGH);
delay(300);
digitalWrite(enPin, LOW);
delay(1000);
digitalWrite(enPin, HIGH);
digitalWrite(motorPin0, HIGH);
digitalWrite(motorPin1, LOW);
delay(300);
break;
}
}

contents for book

Title : House of Tales

The Juniper Tree
My mother, she killed me.My father, he ate me.My sister, Marlene, she made sure to seemy bones were all gathered together,bound nicely in silk, as neat as can be,and laid beneath the juniper tree.Tweet, tweet! What a lovely bird I am!


Hansel and Gretel
Oh sweetie girl,It is time to cook a big stew.Girl you prepare it and boy I will eat you.What a delicious stew!
Hyw Witch! I will push and bake you when the oven was so hot and red.What a delicious witch cookie!


Where The Wild Things Are
Bad boy, fled my town, hungry.A minor king in another land,By slight of hand.Rumpsed with the wild things,In my bed, In my head,Home to really sleep for food mom brings. Now to rumpus with the monsters in my hed,I do not travel far day and night.Because the kindest one sleeps in my bed,He's mostly tame, and we're well fed.


The Little Prince
Does my drawing scare you?
Why be scared of a hat?
My drawing is not a picture of a hat.It is a picture of a boa constrictor digesting an elephant.Grownups always need explanations.

the second prototype



Idea sketch and the first paper dollhouse mockup





Wednesday, November 01, 2006

final production - performance in Halloween parade in Greenwitch Village