Setting Up Raspberry Pi To Run Bots


Where’s the server? It’s under the table next to the couch!

The Raspberry Pi can be used for lots of cool projects, but because it’s cheap, small, and consumes far less power than a regular laptop or desktop, it’s perfect for applications where a computer needs to be running constantly, such as a server for running Twitter bots!

I have seven bots running at the moment, tweeting things like art assignments, “would you rather?” questions, and links from a 1995 “internet directory” book. Most of them post once an hour at varying times during the hour, meaning I need to run them from a computer that is always on, 24/7. I had previously used a Mac Mini, but it felt wasteful to have such a powerful computer that consumed so much energy, just to post 140 characters to Twitter.

By way of comparison, here is the energy use of a 2012 Mac Mini and a Raspberry Pi Model B:


The Mac Mini also creates a lot of heat, even when not really doing anything. It’s average heat dissipation is 126 BTUs per hour, or the equivalent of 1/3 of a human!

Update: turning off video output (via RCA/HDMI) can save power consumption even more, especially for battery operation. Turn it off using the following command: /opt/vc/bin/tvservice -off, though it may not work on your device.

That’s enough convincing: let’s run some bots!

Continue reading “Setting Up Raspberry Pi To Run Bots”