Ironic Mustache Twitter Interface

17K4519

Intro: Ironic Mustache Twitter Interface

This interface is really cool but you've probablly never heard of it. 

The IMRI seeks to create a twitter experience like no other, and tickle your mustache at the same time. Using space age technology, you too can know the moment someone is talking about staches on the twitterverse. Everytime someone tweets out #mustache, your mustache will vibrate, telling you exactly when someone is talking about mustaches. 

Perfect for those hipsters who have everything. 

STEP 1: Stuff You Might Need If You're Cool Enough

A fake mustache, or a real one that you ripped off your face
vibrating pager motor
a retro arduino board
sweet programming skills
Old drinking straw
some solid core wire

Not necessary but you're a total poseur with out it:
Wayfarer sunglasses
Fixie bike
a case of PBR brah!


STEP 2: Putting the 'stach Together

First you gotta make the 'stache vibrate. 

Solder some wires to your motor so you can attach it to the arduino easier. I used small solid-core, but this is a free country DO WHATEVER YOU WANT!

PROTIP: use your lighter to strip off the small wires. The plastic will just crumble off. Once your done you can use your lighter to light your american spirit cigarette. What? you're still smoking camels? how lame. 

Next i took a drinking straw and put it around the motor, i did this because the stache' hairs get caught in the motor otherwise. 

Lastly i took some hot glue and told that motor whos boss, but attaching it to the stache' Celebrate by throwing on some MGMT on that vintage ipod from 2006




STEP 3: Code the 'Duino and Computer.

I could have used ruby, but ruby is for wannabe hipsters who hang out on in North Beach and think Chipotle is a "real" burrito place. 
I explained this in more detail in My Twittering coffee pot instructable, check that one out if you're having trouble

Python is mad fresh, Here's the code for that. Just run in a terminal on your Computer:
import twitter
import serial
import time

 
class Moustache(object):
    def __init__(self):
        self.api = twitter.Api(consumer_key='jWa7GzYNHjI2FVocKNgNig', consumer_secret='PUT_HERE', access_token_key='PUT_HERE', access_token_secret='PUT_HERE')
        self.status = []
        self.status2 = []
	self.ser = serial.Serial('/dev/ttyUSB0', 19200)

    def finder(self):

        twit = self.api.GetSearch(term = '#mustache')
        print twit

        self.status = [s.text for s in twit] ##put status in an array                                                                                                                                             
        print self.status

        if self.status == self.status2:
            print 'Awaiting Tweet'
            self.ser.write('0')
        else:
            print 'Mustache Found'
            self.status2 = self.status
            self.ser.write('1')		
if __name__ == "__main__":

    print 'Welcome To Mustache Finder!'

    m = Moustache()

    while 1:
        m.finder()
        time.sleep(5)
The Python using the Python-Twitter Library searches recent tweets with #mustache and then gives a signal to serial to interact with the arduino. While this code is running your arduino along with mustache module should be connected.

The arduino code is here, to be uploaded to your arduino:

int relayPin =  13;    // LED connected to digital pin 13
int incomingByte = 0; //declare incoming byte
// The setup() method runs once, when the sketch starts

void setup()   {                
  // initialize the digital pin as an output:
  pinMode(relayPin, OUTPUT); 
  Serial.begin(19200);           // set up Serial library at 19200 bps
  
  Serial.println("Arduino is ready!");  
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                     
{
  if (Serial.available() > 0) {
		// read the incoming byte:
	incomingByte = Serial.read();
        Serial.println(incomingByte);
        if (incomingByte == 49){
          digitalWrite(relayPin, HIGH);
        } else {
          digitalWrite(relayPin, LOW);
        }
       
        // say what you got:
	Serial.print("I received: ");
	Serial.println(incomingByte, DEC);
  }
}
</pre>
Once all that is done, you should feel the tweets pour in. 

STEP 4: Hooking It Up

Wire it all together, run the code on your computer and arduino and you're done.

You now have the dankest vibrating mustache in the land, and you can know exactly when someone it talking about a 'stache on the twitterverse. 

Hope you had fun, i'm out, i gotta alleycat dive bar race to go to. 

20 Comments

OKay I have to admit your project is super cool, I will try to connect it to our dinosaur twitter game!
https://www.facebook.com/TweetLovers

can someone help me? im getting this error when I run the python code

Traceback (most recent call last):
File "/Users/mcasanas/Desktop/Mous.py", line 6, in
class Moustache(object):
File "/Users/mcasanas/Desktop/Mous.py", line 11, in Moustache
self.ser = serial.Serial('/dev/tty.usbmodemfa131', 19200)
NameError: name 'self' is not defined
Awesome! Moustache + technology = 5 stars!
hilarious, but have you thought of using the network shield to pull from the twitter directly, without the need for a computer & serial connection?
I had a arduino mod that would send a tweet whenever my home back door opened, so i could get the tweet when i was out - twitter alarm system, no computer required.
Do you still have the code for that project?
Does it work wirelessly?
change moustache for your name and your moustache will vibrate until you sneeze, so everytime someone twitts about you, you will sneeze
"... or a real one that you ripped off your face"

Only if you happen to be Chuck Norris!

What if you spell it MOUSTACHE...will it still work!?
...and yes that is me in my avatr pic...and it is a real moustache...grown in aid of male cancer research last year for Mo'vember...
Where's the video? I want to see it in use.
Seconded. Also, I'm gonna go make someone's mustache vibrate now.

I can see this technology being horribly abused.... ^_^
I love this, how can you go wrong with moustaches?
Can't I use my real mustache still attached to my face???
Would you be willing to explore creating a 'sister' project to assist in the latest Canadian Cancer Society's cancer awareness campaign?

Here's the site and project description: http://julyna.com/
This instructable was good up until the smoking reference. Go Quit.
how meta do you have to be to ironically make fun of the ironic?

*grumbles under his breath about hipsters ruining awesome mustaches for everyone*
Hipsters ruin everything. EVERYTHING.
at the very least everything i tend to like. like irony, archaic facial hair styles, snark, pointless tattoos...
Real world application of science! Love it!
Damned wannaby hipsters!

Loving the instructable, I only wish my own 'tash would tweet!