Twitter Mood Light - The World's Mood in a Box

Twitter Mood Light - The World\

How's the world feeling right now? This box tells you.

Powered by: an Arduino, a WiFly wireless module, an RGB LED, Twitter.com and a 9v battery.

I’m a news junkie. I want to know everything that is going on in the world as soon as it happens. I want to wake up and know immediately if something big has happened overnight.

However, I’m an extraordinarily busy man; I don’t have time to read news feeds; reading that headline that I already knew about or don’t care about is time that I’m never getting back!

No. What I need is some way to be constantly in touch with the world's events as they unfold, alerted when something big happens, and to be made aware of it all faster than awareness itself!

...A way to get a glimpse of the collective human consciousness as an extension of my own.  Something that I don't have to continually check or poll, but instead, like a part of my body, it will tell me when it's feeling pain or generally in need of my attention ...leaving me time to get on with other things.

And so, I present: The World Mood in a Box!

The Arduino connects directly to any wireless network via the WiFly module, continually searches Twitter for tweets with emotional content, collates the tweets for each emotion, does some math, and then fades the color of the LED to reflect the current World Mood; Red for Anger, Yellow for Happy, Pink for Love, White for Fear, Green for Envy, Orange for Surprise, and Blue for Sadness.

If an unexpectedly high number of tweets of a particular emotion are found, then the LED will flash to alert us to the possibility of a world event that has caused this unusually strong emotional reaction.

For example, a world disaster and it may flash Blue or Red (sadness or anger), if the strong favourite loses a big football game it may fade to Orange (surprise), …and If it flashes White, the collective human mind is feeling extreme fear, and it's probably best to go hide in a cupboard and sit it out, waiting for sunnier skies and a return to Yellow or Pink.  ...OK, I'm not that busy.

 
Remove these adsRemove these ads by Signing Up
 

Step 1How it works

How it works

An Arduino connects directly (no computer required!) to any wireless network via the WiFly module, repeatedly searches Twitter for tweets with emotional content (aka sentiment extraction or tapping into the moodosphere), collates the tweets for each emotion, analyzes the data, and fades the color of an LED to reflect the current World Mood:

  • Red for Anger
  • Yellow for Happy
  • Pink for Love
  • White for Fear
  • Green for Envy
  • Orange for Surprise
  • Blue for Sadness
Example search terms to find tweets that may express surprise:
  • "wow"
  • "can't believe"
  • "unbelievable"
  • "O_o"
If an unexpectedly high number of tweets of a particular emotion are found, then the LED will flash to alert anyone nearby to the possibility of a big world event that has caused this unusually strong emotional reaction.

Example signals:
  • A world disaster and it may flash Blue or Red indicating it best to check a news site to see why everyone is so sad and/or angry.
  • If the strong favourite loses a big football game, it may flash Orange to express the surprise at this unlikely event.
  • If there is a heat wave in London it might turn Yellow to reflect how much happier people now are.
  • If it flashes White, the collective human consciousness is feeling extreme fear and something terrifyingly bad is probably about to happen. Time to hide and/or panic.
Uses
  • You could put it on your desk to get an early warning of something big happening somewhere in the world
  • A literal 'mood light' at a party or a game whereby you guess what colour it will change to next and for what reason
  • A world mood barometer perhaps next to your bed to decide if it is best to hit snooze until it's less angry outside
  • A gauge of public sentiment to help you decide when to sell all your stocks and shares, and head to the hills.
  • In a foyer or waiting area or other public space for people to look at and contemplate.
  • Set it to connect to any wireless network and carry it around in the streets, stopping strangers to explain to them that you have managed to capture the world's mood and have it locked in this here box.
« Previous StepDownload PDFView All StepsNext Step »
74 comments
1-40 of 74next »
Jun 11, 2010. 9:31 AMshobley says:
I built the device, but noticed something strange in the LED library,. When you call analogWrite you are subtracting the values from 255, and yet the array of values is written to be applied directly. i was getting strange colors until I removed the "255 -" from each call to analog write. The movie here shows how it is responding before the fix: http://www.stephenhobley.com/blog/2010/06/11/arduino-world-mood-light-using-twitter-and-wishield/
Jun 13, 2010. 6:17 PMshobley says:
That would probably explain it - my LED has a common ground connection - so does yours have a +5v common? I think I got my LEDs from Sparkfun originally - it's been stuck in a drawer for a couple of years, so I don't know the model. It was fairly easy to make it work with the WiShield, although I am having some problems keeping it connected to the network. Sometimes it just comes back with "0.00" results for each of the emotional states. I was going to implement the web server functionality - the WiShield has additional ram available to store page templates that can be served up by filename. Great project BTW!
Jun 14, 2010. 11:44 AMfrenzy says:
Congrats!

This project has won the "I Made It" Challenge for today. For that you will receive a 3 month pro membership!

http://www.instructables.com/community/June-is-I-Made-It-Challenge-Month-Win-a-Pro-Mem/
Jan 31, 2012. 9:56 AMilpug says:
I have nowhere near the experience to make one of these things, is it possible that I could buy one from someone, and if so, for how much?
May 15, 2010. 1:35 AMlance_r says:
It would be really sweet to make a desktop version of this you know? so when your doing regular work on the old comp. you can tell the world's mood!
May 17, 2010. 1:06 AMlance_r says:
Much appreciated I tried to take it on myself but got hung up on html parsing haha need to brush up on my c++
Jan 20, 2012. 7:12 PMsamirsky says:
check out:
http://www.mathworks.com/matlabcentral/trendy/plots/644

It only updates once/day, but might be interesting to monitor over time.

Jan 20, 2012. 12:20 PMsamirsky says:
Created a plot to track trends (1/day) based on this great project:
http://www.mathworks.com/matlabcentral/trendy/plots/644
Dec 1, 2011. 4:43 AMpraveenkm says:
Hi,

I compiled this code and getting me lot of errors..
plz help me!!!
Untitled.png
Apr 8, 2011. 2:10 AMmadmazelle says:
Hey ! nice project, very inspiring. btw wanna ask (i'm new with this) is it possible to use ARDUINO ETHERNET SHIELD instead of wifly shield?

will the script be different?
Oct 27, 2011. 12:16 PMjmccauley2 says:
Yes, you could go that route, but you will have to rewrite the sections that reference the WiFly Shield. There's no shortcut, I'm afraid. Change the hardware and you have to change the code.
Oct 27, 2011. 6:51 PMmadmazelle says:
is alright! i bought the wifly shiled.

Thanks for the reply!
Sep 21, 2011. 9:00 AMbrittawater says:
I'm trying to get my twitter mood lamp to work but I keep getting a
'Serial' was not declared in this scope error. Does anyone know how to fix it? When I tried looking online, I came across a blog that suggested to include the Software Serial library, but that didn't seem to do anything.
Oct 27, 2011. 12:14 PMjmccauley2 says:
The fix to that is described over at the Arduino Boards. However, we're still having timing issues to work out among other things. Follow along over here:
http://arduino.cc/forum/index.php/topic,65655.0.html

It also appears that these issues are more common if you're using the Arduino Duo instead of the Duemilanove.
Oct 20, 2011. 3:23 PMbenreed says:
hey awsome project :) but i keep getting error messages on the code? i have never built a project with code before so i have no idea what im doing , i have a fairly good knowladge of computers however , you think you can help?
Jun 24, 2011. 4:53 AMaattwater says:
I built the device, and it looked like it was working correctly giving me an overall mood of mild love. looking at the serial monitor, after doing the query search it shows a list of results, and on the 29th result it cuts short and says "warning: failed to find EXIT" and gives the line: "love: tweets per min = 29.00". it does this for Love, Joy, Surprise and Anger, all giving a result of 29 tweets per min, which seems odd... I'm using an Uno with th Wifly shield.
Jun 19, 2011. 12:16 PMsantoshx says:
This is amazing. For an Arduino novice like me, It worked in the first go! Thanks for this excellent contribution. I am not that familiar with the Twitter interface, is there a way to specific a country and look at the twitter moods there. It will be like a magic cube during international traveling.
Jun 1, 2011. 9:29 AMviolentorchid says:
This is so cool, but I'm still not going to get a twitter.
May 22, 2011. 6:47 PMDeviantgeek says:
What color did it display when Osama Bin Laden died?

Btw, very nice project/instructable
May 19, 2011. 2:28 PMguitarfreak1513 says:
Haha i never got it too work. amazing idea though
Feb 26, 2011. 4:24 AMGenzo says:
Hi, nice project. I'm being to buy products to do it.

But I think I won't use a 9V battery I'm interrested by a Lithium battery like http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=17 (with a solar panel http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=6&products_id=16 ?).

Let's get crazy :)
Feb 16, 2011. 2:33 AM0ReZ says:
a wonderful project, and as said by many its well executed. i have a few questions. instead of a 4-pin LED can it be run on 3 different 2-pin LED? and when i connected the wires to pins 3,5,6 the LED's dont glow. I'm using a 9v plug instead of buying those cumbersome power hungry batteries. waiting to hear a reply.
Jan 20, 2011. 1:14 PMmanu08 says:
Nice!! Where do I get the acrylic plates?
Jan 17, 2011. 7:11 AMJ_Mi says:
This is a great idea and would really like to build one!

However I dont have the money for an arduino or the wifi adapter.

You should collaborate with someone who knows stuff about microchips and create a microchip and maybe replace the wifi with an ethernet port..

(you could add selective tweets through a lan cord that way, and collect tweets)

that way more people may be able to afford it, and you could even sell it to people like me :)
Oct 21, 2010. 7:03 PMmdot2theg says:
Could I use a a WiMicro for this project instead of a Wifly? And if so would the coding/libraries be much different?
great job btw :)
May 20, 2010. 1:01 PMParabola949 says:
...  I have to say.... this is simply genius.   I've viewed many projects on here, but this is the first one I had to comment  on just to say how good of an idea it was.  I WILL be building this.
Aug 11, 2010. 10:08 AMWillTheRescue says:
Possibly a modification to use a simple 9v plug? I'm not sure of the exact name, but I have a lot of them for my synthesizers, and they're all 9.0v. It should be a pretty simple and cheap mod, yes?
May 20, 2010. 5:56 PMTacothemagnificent says:
I completely agree. This is an excellent idea, carried out very well... Building one as soon as possible.
Jul 30, 2010. 4:44 AManonymouse197 says:
I have made a much simplified version of this that reads twitter posts looking for numbers rather than moods. Thanks for the inspiration to make something much less inspiring :) http://www.instructables.com/id/Twitter-Controlled-Light-Bot/
Jul 28, 2010. 4:00 PMpop123321pop says:
would you consider selling me one, if so ,what would you price it?
Jun 23, 2010. 3:46 AMWillTheRescue says:
I love this, and would love this next to my bed! One thing though. To keep cost down, how hard would it be to program the Arduino to read the information straight from the computer via USB connection?
Jun 19, 2010. 4:25 PMjamilm9 says:
and would this work instead of an arduino http://asynclabs.com/store?page=shop.product_details&flypage=flypage.tpl&product_id=23&category_id=11
Jun 19, 2010. 3:48 PMjamilm9 says:
How many ma does this need. Thanks
Jun 7, 2010. 11:44 AMZenix says:
WOW! Absolutely brilliant project, well done!
May 31, 2010. 12:52 AMKiwiIngenuity says:
 What an excellent project RandomMatrix, you should be proud! Excellent project and presentation. I hope I get a chance to build this, what an awesome idea! 
May 26, 2010. 4:34 AMhogofwar says:
Can you mod this to just connect from usb to get the network connection instead of from wireless and get the power from the usb connection instead? maybe a mini version?
May 23, 2010. 4:03 AMhemanthgenius says:
Awesome Idea, We Could Have Various Boxes with a Demographic Filter Showing the Moods of various countries :)
1-40 of 74next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
23
Followers
1
Author:RandomMatrix