Skip to content

Stupid Pet Trick: Topsy Turvy Pet Picture

October 4, 2011

The idea for this project started with the materials and components that I wanted to use. I had a cradled wood panel, a pair of reed relays, a handful of rare earth magnets, and the hobby servo included in the Physical Computing kit. Originally, I had planned on laying the wood panel on its back, creating some sort of interactive surface. I had some model figurines and scenery left over from another class project, and I thought I wanted to use them as well but eventually dropped that idea. After hooking things up, I came to realize that I could rotate a picture or word upside down and right side up based on the presence of a magnet. I was using playing cards at first, but then remembered those optical illusions that are two different things depending on which way they’re viewed. When I found this dog/cat painting created by Peter Newell in 1894, the rest of the project fell into place.

The design for the placard and its slot went through a few iterations, and I think can use a little tweaking still. I ended up breaking off a corner when I drilled it into the panel and I didn’t have the material or time to replace it. When that happened, I still had a lot of work ahead of me to get it working. I also placed the magnets too close to the ends of the placards, meaning that in the resting state, the magnets don’t actuate the reed switch, it’s only when they’re “passing by” the reed relay. The code was probably the easiest part (I hope that’s not held against me):

#include <Servo.h> 

Servo myservo; 

int pos = 0; 

void setup() 
  pinMode(7, INPUT);
  pinMode(6, INPUT);

void loop() 
  if (digitalRead(7) == HIGH)
  if (digitalRead(6) == HIGH)

Aside from coming up with the idea, the hardest part of this project was its physical construction. Luckily, with a lot of help from my fellow students in the shop, I managed to get a working device. Now I can go back to the rest of my work.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: