Inspiration
We brought a Raspberry Pi, an Arduino Pro Mini, and some other various hardware to the hackathon, which were a solution without a problem. We decided it would be interesting and funny to use them to build something which would react to politicians' tweets by angrily flailing around, thereby lightening up the tweets.
What it does
The bot's Python script has a list of Twitter handles to which it will respond. When any of these users tweet, the bot will respond by reading it out loud and waving its arms around.
How we built it
The bot is built from a Raspberry Pi, an Arduino Pro Mini, two servo motors, and some cardboard and red plastic cups. The Raspberry Pi and Arduino communicate with each other over a USB serial connection. To avoid undervoltage on the Pi, the Arduino and thus the motors draw their power from a powered USB hub.
Challenges we ran into
We decided to use Tweepy to handle the Twitter API calls, but the streaming module wasn't really well documented. It took a few hours of tinkering and reading StackOverflow before we were able to have the bot start reading tweets.
Accomplishments that we're proud of
Getting a Raspberry Pi to read from Twitter using the API was the major accomplishment of this project. During our testing, we also created a Twitter account to check if the bot was working; this account is now a mass of irrelevant and humorous tweets.
What we learned
Interfacing a Raspberry Pi with Twitter and Arduino, and using Python in general.
What's next for Media Outrage Bot
This bot is fundamentally a script which listens for tweets and responds accordingly, and as such is fairly extensible. Because Tweepy can listen for both users and keywords, this bot could be spun off as a device to help companies monitor public discourse about them, as some kind of emergency alert system over social media (akin to Facebook), or more lightly as a toy or gadget which lights up or waves when a certain user tweets.
Log in or sign up for Devpost to join the conversation.