Inspiration

One of our biggest inspirations was Twitch Plays Pokemon. Ever since seeing other people controlling a single computer we have wanted to implement a similar system ourselves. With our Twitter to Arduino interface, we have been able to take a big step in achieving this goal!

What it does

Our takes tweets that tag our bot account and, if syntactically correct, translates these Tweets into commands that are passed from a Raspberry Pi to an Arduino that is acting as an I/O slave. After completing a certain task, the bot direct messages the user that sent a command, to ensure that they know the effect of their Tweet. If a user does not know the recognized commands, they can ask the bot for help, and it will direct message them with a list of the supported commands.

How we built it

Our project began with a Raspberry Pi. After reading through the Twitter API documentation, we began our search for a Python library to utilize the API. After searching, we found Tweepy and began working on recognizing when someone would Tweet to our Twitter Bot. After this, we added in multiple statements to recognize what was being Tweeted. With these Tweets, we installed the Nanpy library in order to use an Arduino as an I/O slave to our Raspberry Pi. Finally, with all of the commands inserted and bugs sorted, we are able to control and Arduino with nothing more than a Tweet!

Challenges we ran into

The Twitter API was rather difficult to work with from the get-go. With many different ambiguous errors, we were unsure whether we would be able to sort out the problems by the end. Specifically, one problem with Twitter is that it contains an anti-spam feature that will not allow a user to Tweet the same thing twice in a short time period. This made the project difficult to test at times, although we pushed through!

Accomplishments that we're proud of

When we began the hackathon, we had very low expectations for how we would perform and we ended up surpassing them! We are very proud that we were able to meet all of our expectations and produce a fully working project.

What we learned

Firstly, we learned Python! Before this project we did not know a single line of Python, and by the end we were able to make a rather difficult project using it. Additionally, we learned a lot about APIs and how to utilize them. We felt this was important because APIs are used everywhere. Finally, we learned perseverance. No matter what came up, we pushed through because we had to, and this is a skill that I believe will help us throughout our hackathon seasons.

What's next for Twitter to Physical Arduino Interface

Next up, we want to try and control an Arduino powered car, and possibly create our own version of Twitch Plays Pokemon, except with a robot instead of a Pokemon game!

Built With

Share this project:

Updates