Screen recording :


Uses Twitter, arduino and two LEDs.

The application reads all posts made by HarleyQuinn (a specific one on twitter) and displays them visually using Processing. Whenever a post is made that is either threatening such as “kill” or if she explicitely says “Batman” the brightness of the bat symbol increases as can be seen on the video.

The LEDs are strong enough to display the shadow of the bat symbol on a wall but it can’t be seen while teaching


Erry time someone tweets “arrested”, BAM. Siren. Even though Piezos are incapable of sounding anything like a siren :D

You deserve something nice.

All we need is a simple circuit that reads analog input from a pressure sensor.

The concept is simple: Hook up the circuit and leave the pressure sensor on a table. Run the program and wait.

When someone places an item on the table on top of the pressure sensor, the program will report it to Twitter. “Hey, there’s something here!” it will say. Then it’ll wait.

After a while, it’ll start to send out little encouragements to its audience. “Hey, this is pretty heavy. It might be expensive. Go ahead. Take it. You deserve something nice.” It will continue to goad its readers into stealing the item until the item is removed, at which point it’ll say something along the lines of “Oh, welp, it’s gone. You snooze you lose.” It’ll then lie in wait of the next item.

Go on. Take it!

The following code serves as the base for the program.


import processing.serial.*;
import cc.arduino.*;

Arduino arduino;

static String OAuthConsumerKey = “ipBgVE4kIVANsflVUXBglA”;

static String OAuthConsumerSecret = “cHeE4Kv2BbV0x1Uc1LfeVdUQzSBaRUiiFZFoUr7Ss”;
static String AccessToken = “974484246-q6Vxax2aSf5cUyYykItVLz1dBbUK0RevizhXicsA”;
static String AccessTokenSecret = “N5F9cMO651qe3pZNT1z7SXS7KZZ769hRBQ24o8J8U”;

int pressurePin = 2;
int timer = 0;

String myTimeline;
java.util.List statuses = null;
User[] friends;
Twitter twitter = new TwitterFactory().getInstance();
RequestToken requestToken;
String[] randomNewThing = new String[3];
String[] randomGoneThing = new String[4];
String[] randomStealIt = new String [5];

int prevPressure = 700;

void setup() {
randomNewThing[0] = “Oooooh! Someone left something here!”;
randomNewThing[1] = “Wait, wait, hold the phone… There’s something here!”;
randomNewThing[2] = “Good golly, lookee here! Someone left something on the table.”;

randomGoneThing[0] = “Oh, well, there it goes… that’s too bad.”;
randomGoneThing[1] = “Welp, you snooze you lose. It’s gone.”;
randomGoneThing[2] = “No no no, wait, where’d it go?”;
randomGoneThing[3] = “I feel… a great emptiness. Oh, no, wait, that was just the really amazing thing being lifted off the table and taken away.”;

randomStealIt[0] = “Hey. I had a thought. You could take this. No one would know.”;
randomStealIt[1] = “Come and take it. It’s really cool. And shiny. Probably expensive. You know you want it.”;
randomStealIt[2] = “Wow, I gotta say, this is fancy. You could probably sell it for quite a pretty penny.”;
randomStealIt[3] = “You deserve something nice. Go on. Take it. For you.”;
randomStealIt[4] = “This would really match the decor in your living room. You could hang it on your mantle. Like a moose head. Only better.”;


arduino = new Arduino(this, Arduino.list()[0], 57600);
arduino.pinMode(pressurePin, Arduino.INPUT);

void draw() {
int pressureValue = arduino.analogRead(pressurePin);


if(prevPressure > 0 && pressureValue == 0) {
int randomChoice = (int)random(3);
else if(prevPressure == 0 && pressureValue > 0) {
int randomChoice = (int)random(4);
timer = 0;
else if(timer > 500 && pressureValue == 0){
int maybeSteal = (int)random(5000);
println(“maybesteal: ” + maybeSteal);
if(maybeSteal > 4998){
int randomChoice = (int)random(5);
println(“choice number: ” + randomChoice);
prevPressure = pressureValue;
void connectTwitter() {

twitter.setOAuthConsumer(OAuthConsumerKey, OAuthConsumerSecret);
AccessToken accessToken = loadAccessToken();


void sendTweet(String t) {

try {
Status status = twitter.updateStatus(t);
println(“Successfully updated the status to [” + status.getText() + “].”);
} catch(TwitterException e) {
println(“Send tweet: ” + e + ” Status code: ” + e.getStatusCode());


private static AccessToken loadAccessToken(){
return new AccessToken(AccessToken, AccessTokenSecret);

Real-life Tamagotchi

I’m considering an interaction between my dog and twitter. There will be a series of buttons, levers, that my dog can paw at that each associates with something my dog wants to do like go for a walk, or eat, etc. all of these interactions will be automatically sent to twitter which can be directed to the phone.