STATUS:

This project is currently DEAD. This was built for a design lab and the robot platform was taken back by the school at the end of the semester.

Intro:

In 2014, a new cultural phenomenon took place. A simple script allowing for users to control a game character just by using chat messages, dubbed “Twitch Plays Pokemon,” was said to have over 1.1 million players over the course of its 16 day initial run. The goal of this project was to recreate that experience using a robot and the Twitter platform instead of Twitch. This was done with the help of a Raspberry Pi, which will connect to Twitter and send the motor driver circuit commands based on the different modes. We also built an analog controller to be able to drive the bot to safety in case of malfunction, or just to have a little bit of fun ourselves. All in all, it is a relatively complicated project with lots of moving parts, but was quite fun to play with upon completion. It is important to know that this picks up where the design lab page leaves off, and might be confusing if you have not read that page yet.

Part 1: Controller:

The goal for the controller was to integrate tank style controls into the motor control portion of the robot. The idea behind this was to completely remove all of the obvious issues of sentience by providing us a way to drive the robot to safety if it starts destroying villages. By using a simple circuit that turns the Arduino off (so that the bot cannot be controlled that way) and directly hooks into the pins of our motor controller, we can control the robot using entirely analog circuitry. This was done using a simple circuit with 2 slide potentiometers for directions. 4 trim potentiometers were used to make sure that the bot goes forward and back straight, but are not really touched after that. Once that is all done, it can be just linked in to the motor control circuit. The final circuit can be seen below:

The final controller. Dir1 and Dir2 control the directions and go through the pots to determine speed.

Part 2: Twitter:

Since this portion is mostly code, and a lot of it is fairly self explanatory, I will avoid wordy conclusions in order to just point you to the code, which can be found here. The simple gist of it is simply that the bot contacts the Twitter API, pulls down either the admin feed or the hashtag feed, and then sends the appropriate command to the Arduino in binary.

Conclusion:

All in all this project was quite a mess, and the bottom line is that the Raspberry Pi is not meant to be used in low-power, abrupt power off situations. This led to tons and tons of problems with everything from WiFi to full on file-system corruptions. The end result was successful, but the Pi only started up successfully 1/20 times, and the bot wasn't really exciting to drive around. On top of that, we had to build 2 extra power supplies just to run the Pi and the WiFi card at the same time, which altogether pulled about 2.5 amps of current at 5V. In the end though, it worked, and the controller was quite fun to play around with.