mood lighting driven by delicious Justin Bieber tweets
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Bieber-net Bieb-emotion Box

Mood lighting driven by delicious Justin Bieber tweets -- wrapping together Twitter, natural language processing for sentiment analysis, and text-to-speech APIs with code to control LEDs, every hour on the hour you can have Justin Bieber serenade you with his tweets (or make up your own)

oh so sexy bieber


You need to install wiringPi to control the LEDs, and you need to have SPI enabled from the options when running sudo raspi-config

eSpeak and Google Text-to-Speech are used for text-to-speech (you can switch between them), and can be installed by running sudo apt-get install espeak and sudo pip install gTTS respectively

Make sure you have all your audio dependencies installed for text-to-speech to work by following this guide

Finally, the python-twitter API needs to be installed, which can be done by running sudo pip install python-twitter

No dependencies need to be installed for sentiment analysis, but for reference, Text-Processing is used via HTTP POST.

Installation and Setup

Clone this repo using git clone

For the Twitter API to work, you need to have proper authentication keys. You will need to make a file called api-keys.txt in the same folder as all these files. This textfile should contain only 4 lines: Consumer Key, Consumer Key Secret, Access Token Key, Access Token Key Secret. These API keys can be found from

Run make and run chmod +x

Edit your crontab (run crontab -e) to include the following lines in order to have the program run at startup and hourly:

@reboot cd ~/Biebernet-Biebemotion-Box/ && sleep 60 && ./ 
@hourly cd ~/Biebernet-Biebemotion-Box/ && sleep 60 && ./ 

Finally hardware-wise, follow the pin-out guide from wiringPi and connect the LPD8806 strips over SPI to the Pi

Manual Usage

run ./ and use ./ -h to see help for how to manually control tweets, specifically set different users to grab a tweet from, or whether to use a the better Google Text-to-Speech synthesizer (disabled by default)