Tag Archives: Twitter API

Twitter Mood Lamp visualizes the mood of Denver


This 3D-printed, Arduino-powered lamp changes colors to match the mood of Denver. 


Many people consider New York to be a busy metropolis filled with irritable and angry people. On the other hard, others find Los Angeles to be more laid-back. New Orleans, well several folks would say it’s rather festive and jovial. However, the mood of a place like Denver, Colorado is a bit harder to classify. That’s why Maker Chadwick Friedman has created a 3D-printed Twitter Mood Lamp that, as its name would imply, changes colors to match the attitude of the city.

3D-Printed-Twitter-Mood-Lamp-by-Chadwick-John-Friedman_1

Inspired by those mood rings from the ’70, Friedman decided to build a lamp that would actively respond to Twitter trends. The project itself is controlled by an Arduino Yún (ATmega32U4), which causes the device to emit either red, green, or blue based on whether the mood of the city is perceived to be angry, happy, or sad, respectively. The Maker employed the help of Temboo to capture and analyze the sentiment of Denver by searching for specific keywords that might indicate the emotional state of users via the Twitter API.

In order to limit this project to Denver, the Maker used the city’s latitude and longitude to restrict retrieved tweets to within a 12-mile radius. Friedman adds, “As they’re retrieved, these tweets are outputted onto the Arduino Yun’s serial monitor as well as classified under an emotional state. A running tally is kept of the mood and the lamp glows the color associated with the predominant mood. If its intended use is for an extended period of time, the tally can be enabled to forget tweets retrieved longer than an hour ago. Alternatively, it can scrape twitter at specified intervals and glow the mood associated with tweets only made it in that duration.”

mood-lamp-1

Keep in mind, this isn’t the first time a Maker has creatively displayed the emotions of his or her area based on its social media users. In fact, one Maker recently illuminated the snow on his frontyard to reflect his town’s current mood, while a group of design students devised an interactive installation that literally painted the mood of their city. Intrigued by this IKEA-like, interactive lamp? You’ll want to watch it in action below!

This instrument creates music based on the emotional status of Twitter users


“We’re pickin’ up good (social) vibe-rations.”


Initially designed as a Master’s degree project at the University of Limerick in Ireland by Cian McLysaght, Social Vibes is a unique installation that creates music based the emotional expressions of Twitter users.

vibe-top_00000

The harmonic tunes are derived from a continuous stream of input by multiple Twitter users as well as the explicit interaction from those tweeting the steampunk-esque machine via its @vibe_experiment handle. Data associated with the emotional status of those online is mined from the social network via its open-source API. Meanwhile, Vibe adopts fundamental sound mechanisms used in a vibraphone (hence its name) and is powered by an Arduino Uno (ATmega328).

How it works is simple. When a user sends a post to Vibe directly, they are given instant remote control over the instrument. At that moment, their emotional state is shown on the device’s built-in LCD display as their tweet/musical composition is ambiently shared. A user can tweet using their Twitter account or by Twitcam, where the Vibe streams live video and audio online of the instrument being played.

vibe-screen-1_00000

“For example if a user tweets ‘The sun is out, I’m happy,’ the code I’ve written will strip out key words and strings associated with the user’s emotional state, within the tweets, i.e. ‘I’m happy,’ and translate this to a musical notation. Mining Twitter’s API, allows a continuous stream of data. These emotional states are then mapped to specific notes on the physical musical instrument, located in a public space. The tempo of the musical expression will be entirely based upon the speed and volume of the incoming tweets on the Twitter API,” McLysaght writes.

img_3387

The instrument itself is comprised of a dozen musical tones of varying pitches, which are created by striking any one of 12 keys using the ATmega328-driven solenoids. What’s fun is that this enables users to hijack the instrument in a playful manner, as well as provides those with musical knowledge the opportunity to compose simple musical arrangements. When users are not tweeting the instrument directly, the Vibe will revert to mining the Twitter API.

Interested? Head over to its official page to learn more, or watch it in action below!