Arduino sketches and Python scripts for twittering via USB (no Ethernet shield required!)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Brad Wells wrote an awesome blog post on twittering from the Arduino via USB.
You can find his article here -
I'm not including his Python script as a courtesy, but it's fairly straightforward.
A little more info is available on a blog post I wrote -

This script,, monitors a given twitter account for @ mentions
and will then send data mesages to the Arduino.
There's a lot of potential uses - the example simply passes the number 1 or 2 to the Arduino which then correspends to calling a certain function within the sketch. Make sure you read my blog post on registering an app at to obtain the tokens that you need to add to Python script.

The Arduino sketch itself then monitors for any data being sent to it's serial port, and will then call a couple of functions depending on what it is presented with. You can expand beyond simply using a switch statement to call a given function. This is just an example of how to then have the Arduino process some code based on what you send it via twitter.

Note that the Python scripts sends ASCII characters that will need converting by the Arduino.
In the sketch, I simply subtract 48, as I'm just sending a 1 or 2 to make it simpler.
Check for a complete breakdown of converting.