Make Me Happy: Arduino Project

The goal of this project was to hack a device and transform it into something else. I chose to take apart an alarm clock and see what parts I could use from it. After I hacked it open, I found multiple electronic buttons that I could use in order to create a form of digital input. The only thing that I needed to figure out was what the output would be. I chose my output to be LEDs mainly because of the impact that they have in a project despite their size and their effect on peoples emotions. Figuring out the coding for this project was relatively tricky. I eventually chose to create a random number for each button pushed; depending on the number that was generated would influence the text line that would be red out and the pair of LEDs that would light up.

The line that is printed to the screen from each LED corresponds to an action that the user supposedly did and the response is chosen randomly by the computer. The concept behind make me happy is that no matter what action we take, we will affect people in some way. Our actions influence the way other people feel and we can not force the person we affect to feel the way we want them to. Only the affected person can choose how they want to feel and this project is designed to exemplify that. Of course, there are three phrases that correspond to the normal reaction given depending on the input but there are three others that do not normally correspond to the input given. I also have three buttons not soldered to also display that sometimes people can give input however there may at times be not output.

For the overall design, I wanted to show how simple it is for our actions to affect other people so I went with a card board design and having the ‘guts’ of the alarm clock showing. The box covers the Arduino and central wiring as we are unable to see what goes on behind the scenes when we, as people, affect one another. 

Video Demonstration

 

 Arduino Sketch

//8 buttons are present so 8 situations to make the interface
//1. You stabbed me, I'm sad : trigger red
//2. You gave me ice cream : trigger green
//3. You gave me a bandaid : trigger multi
//4. You killed my puppy: trigger red
//5. You gave me a soda: trigger green
//6. You gave me advice : trigger multi
//7. You mugged me: trigger red
//8. You helped me move: trigger green

int redButton1 = 2;
/*int redButton2 = 3;

int greenRed1 = 4
int greenRed2 = 5;

int greenButton1 = 6;
int greenButton2 = 7;*/

int ledRed = 13;
int ledGreen = 11;
int ledMulti = 12;

void setup(){

    Serial.begin(9600);
    pinMode(redButton1, INPUT);
    pinMode(ledRed, OUTPUT);
    pinMode(ledGreen, OUTPUT);
    pinMode(ledMulti, OUTPUT);

}

int trigger = 0;

void loop(){

trigger = random(0, 7);

//below are three states of happiness determined by a 
//random number, if lucky all buttons should run off 
//this interface

if(digitalRead(redButton1)==HIGH && trigger == 1 )
{
    digitalWrite(ledRed, HIGH);
    Serial.println("You killed my puppy, I'm sad");
    delay(900);
}

else if(digitalRead(redButton1)==HIGH && trigger == 2 )
{
    digitalWrite(ledMulti, HIGH);
    Serial.println("You gave me a bandaid, I'm neutral");
    delay(900);
}

else if(digitalRead(redButton1) == HIGH && trigger == 3 )
{
    digitalWrite(ledGreen, HIGH);
    Serial.println("You gave me ice cream, I am happy");
    delay(900);
}

else if(digitalRead(redButton1) == HIGH && trigger == 4)
{
    digitalWrite(ledRed, HIGH);
    Serial.println("You gave me a ball, I'm sad");
    delay(900);
}

else if(digitalRead(redButton1) == HIGH && trigger == 5)
{
    digitalWrite(ledGreen, HIGH);
    Serial.println("You broke my lego tower, I am happy");
    delay(900);
}

else if(digitalRead(redButton1) == HIGH && trigger == 6)
{
    digitalWrite(ledMulti, HIGH);
    Serial.println("You charged my iPod, I'm nuetral");
    delay(900);
}

digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, LOW);
digitalWrite(ledMulti, LOW);
trigger = 0;
//delay(20);

}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s