We've all seen mood lights; LEDs in a box that create an emotion in the room using colour. But what about a mood light that actually reacts to emotion? Twitter is used globally as a communication tool, and is often used right-in-the-moment as events occur. In fact Twitter has been used as a tool to help warn people of incoming natural disasters. If you search for enough certain terms, you will be able to get an overall picture of the world's mood. That's exactly what Instructables user RandomMatrix has done with his Twitter Mood Light.

The Twitter mood light searches Twitter for various terms that are used often to express a feeling. Phrases such as "wow", "can't believe", and "unbelievable" will probably we used to express surprise, and for fear you might use "I'm so scared", or "I'm really afraid". It then computes the most dominant mood, and displays it in colour.

The mood light is powered by an Arduino and Wifly
The mood light is powered by an Arduino and Wifly

Various colours and used to convey an emotion: Red (Anger), Yellow(Joy), White(Fear), Green(Envy), Orange(Surprise), and Blue(Sorrow). These are mostly colours we already associate with their emotions. If an unexpectedly strong emotion is detected, then the LED flashes to alert of the probable breaking news.

The actual hardware is pretty simple. An Arduino is connected to a WiFi shield to allow wireless connection to the internet. Also connected is the LED, and a 9V battery to make the whole project standalone and portable. A simple sketch polls the Twitter API for search terms, and calculates the mood from the results in the JSON. The moods are run through a moving average, calculating a baseline, and checking for any deviations to indicate a change in mood.

The whole project is mounted in a clear acrylic box, to create the soft, even glow. If you'd like to make your own Twitter Mood Light, you can follow the Instructable guide step-by-step, although you possibly may have to change it slightly to work with Twitter's new authentication system.