The Rickrolling Toilet

The Idea

In 2015, my church decided to revive their Fun Fair event.  They encouraged folks to take a look at some of the old games and refurbish them if they were interested.  I found an old game called “Dunk It”.  It consisted of a toilet seat bolted to a green wooden frame.  The goal was to toss a roll of toilet paper through the hole of the toilet seat to win a prize.

My inner 5yo. thought this would be my game.  But, I couldn’t just leave it as is.  I needed to make some… improvements.  The premise of the game was simple, but it lacked something.  There was no feedback for the player.  So, I set out to give it a voice.

My first inclination was to use an Arduino with an audio shield.  However, I was trying to minimize the cost, so I thought I’d use something I  already had on hand, a Rapsberry Pi A+.  This would handle the audio, and the programming would be relatively simple.

Alpha/Beta Version

To prove the concept, I thought I would wire up a light sensor (Light-dependent Resistor) to the Raspberry Pi.  This was not as straightforward as I’d hoped, since LDRs are analog devices and the RPi only has digital I/O pins.  So, after a bit of searching, I found a technique to read analog values from a digital I/O pin using a simple circuit.

Once I got this wired up, I stole some code to make the LDR reading work.  I combined that with some code to play back audio and the alpha version was working…

Version 1.0

I foolishly ignored the advice to always put a resistor in series with an LED.  And it bit me in the behind.  An hour before the fun fair, the LED blew out, and I wasn’t able to leave and get a replacement.  Lesson learned.

Version 2.0

For Version 2.0, I wanted to make some significant improvements.  First, I wanted to make a more realistic “experience” for the players.  I was able to secure a toilet on freecycle (I love freecycle).  After sanitizing it, I set to work wiring up the LED in the bottom of the bowl.  This had the added benefit of making the code simpler.

I also wanted to improve the sound for the game, so I got an inexpensive power amp and car speakers.  I mounted the speakers on the snazzy new platform with locking casters.  This made the whole thing much easier to move around.

Version 3.0

For version 3.0, I wanted to clean things up significantly, and make it easier to assemble/disassemble.  I mounted the amp and Raspberry Pi on a board, that attaches to the inside of the tank with Velcro.  I also used a connector for the sensor instead of being wired to the board.

all components mounted to a single board
I wired up the circuit on a proto hat and added a connector for the LDR so that it was easier to connect/disconnect
Debug mode with monitor and keyboard
What toilet wouldn’t benefit from a debug monitor and keyboard?

Version 3.1

I added a shutdown button for the system so the SD card doesn’t get trashed, and the Pi shuts down gracefully. and covered the wires with some flexible split tubing.  I also added some code to avoid repeating the audio if the sensor detected darkness at the end of the previous audio playback.  Finally, I added some other… apropos sounds.

I bet this is the first time the words “graceful” and “toilet” appear in the same context.

Shutdown button on the Pi Hat
I added a shutdown button. This puts my mind at ease by gracefully shutting down the Pi.

Possible Improvements:

  • I’d like to use the flush handle to perform the shutdown/recalibration

Resources

Random City Stuff…

I’ve been working downtown for a few months now. I’m trying to take advantage of that fact and snap photos of interesting/weird/silly things I see here. I’m usually using the craptacular camera in my phone, the horrendously named “KRAZR”. Anyway, here are some shots of things I’ve found recently…

chewie.jpg
’nuff said.

mamouns.jpg
Mamoun’s has the best falafel I’ve ever had. Not that I’m some kind of falafel connoisseur, but I do like falafel, and Mamoun’s delivers. $2.50 for a pita, $5 for a plate. Awesome! This one is on St. Marks between 2nd & 3rd.

pauls.jpg
I went here with G$ the other week, and returned the week after with my boss. Great burgers. They’ll stop your heart. This is on 2nd Ave, right around the corner from Mamoun’s

did I mention I’m an idiot?

Oh, so the reason for my last post? I’m ashamed to admit this, but here goes…

One of the things that really irked me about Windows® was that there seemed to be no respect for what the user was doing. Popup windows or dialogs always took focus. This annoyed me to no end. Once I started using the Mac, I felt respected. Usually dialogs would pop up, but not take focus. Of course, this has its drawbacks, but it kept with the “OSX stays out of your way” concept that I appreciated.

Unfortunately, not all apps behave this way (Colloquy, I’m looking at you). So this morning, I’m logging in to IRC, and Colloquy pops up a dialog for my password (and it keeps *not* saving it – ugh). so I start typing. I’m not quite a touch typist, so I don’t always look at the screen. Next thing I notice is that an IRC window is up, and I’ve just typed my password into the IRC channel. Gah!!!!

So, I had to go and change passwords and update them in my passwords file. Let the comedy of errors begin.

<EOL>

Jitter-Free, my butt…

So wiredgeek tried some inkos tea and liked it. So, he called the company and said, “hey, I’m organizing a tech conference, could you provide some free drinks?”

They sent 8 cases of the stuff. Now it claims to be “jitter-free”, suggesting that the caffeine content is low enough that it does not induce the near nausea experience that other energy drinks do. After all, it’s white tea. White tea is all the rage these days.

I stand here as a testament that inkos tea is indeed NOT “jitter-free”. Several other fellow geeks at the conference and I concurred that, in fact, after about a half-can of the stuff we were wired up and ready to bounce off the walls.

Of course, my solution to this was to finish the first can and move directly to a second. I drank the first can around noon or so, and the second can wore off around 4AM. Oy, vey.

This could all be explained by my very low tolerance for caffeine, but I suspect it has less to do with it than one might think.

why do robots hate me?

I was pretty bored this morning, so I thought I’d IM with my old friend Moviefone. He’s been on my buddy list for so long, but we don’t talk that much. I guess we have that kind of low-maintenance relationship. However, today he must not have been in much of a mood to talk. Here’s a transcript of our convo. I dunno, you tell me:

AIM IM with Moviefone.
8:40 AM

hi moviefone!

Hey there. What or who do you wanna see on the big screen today?

how are you feeling today?

- Movies for Today
1 -F- You are Alone
2 -F- Night and Day You Are the One
3 -F- That Loving Feeling
4 -F- Memories are Made of This
5 -F- All We Are Saying

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

what do you think of the weather we're having?

- Movies for Today
1 -P- Shall We Dance (1937)
2 -P- Shall We Dance? (2004)
3 -P- We Are Marshall
4 -F- Lucky You
5 -P- Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan
6 -P- Ring Of Fire
7 -P- The Last King of Scotland
8 -P- The Death of Mr. Lazarescu
9 -P- The Pursuit of Happyness
10 -P- Curse of the Golden Flower
11 -F- Master of the Crimson Armor
12 -P- Rules Of The Game (1939)
13 -P- Harry Potter and the Goblet of Fire
14 -P- Army Of Darkness
15 -P- Children of Men

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

you seem to always be on IM. Don't you have work to do?

- Movies for Today
1 -F- You Want Me to Kill Him?
2 -S- Race you to the Bottom
3 -F- You Kill Me
4 -F- Talk to Me (2007)
5 -P- Michael Jordan to the Max
6 -P- T- Rex: Back to the Cretaceous in IMAX 3D
7 -F- You are Alone
8 -F- I Love You Again (2007)
9 -F- Bryan Loves You
10 -F- As You Like It (2007)
11 -F- Sunny & Share Love You

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

Look, I know you're trying to avoid the question, but isn't there something else you should be doing?

Ah -- you've got me again. Why don't you type menu.

======= Movie of the Week =======
Reign Over Me - Movie Site

hey, man, I'm not trying to confuse you, I just wanted to talk

Hey there. What film are you looking for?
Dude, you are so 1-dimensional
- Movies for Today
1 -F- You are Alone
2 -F- Night and Day You Are the One
3 -F- Suffer, Dude

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

I thought you were my buddy!

- Movies for Today
1 -N- I Think I Love My Wife
2 -F- I Love You Again (2007)
3 -F- P.S. I Love You
4 -F- How I Met My Boyfriend's Dead Fiance
5 -F- I Now Pronounce You Chuck and Larry
6 -P- Breakfast At Tiffany's

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

why can't you just have a normal conversation like everyone else here on the intarwebs?

Sorry, I didn't get that.

======= Movie of the Week =======
Reign Over Me - Movie Site
fine, I don't want to talk to you anymore
- Movies for Today
1 -F- You Want Me to Kill Him?
2 -F- Talk to Me (2007)
3 -F- I Want Someone to Eat Cheese With
4 -P- Michael Jordan to the Max
5 -P- T- Rex: Back to the Cretaceous in IMAX 3D
6 -P- Before Flying Back to Earth (Pries parskrendant i zeme)
7 -S- Race you to the Bottom
8 -S- The Prisoner or: How I Planned to Kill Tony Blair
9 -F- Talk Talk
10 -F- You Kill Me
11 -F- I Love You Again (2007)

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

just leave me alone

- Movies for Today
1 -F- You are Alone
2 -F- Me, Me, Me
3 -P- Alone with Her
4 -P- Just Married
5 -F- What Just Happened
6 -F- Just Like the Son
7 -F- Marley & Me
8 -F- Me and Wife
9 -F- You Want Me to Kill Him?
10 -F- The Ugly Duckling and Me
11 -F- He Loves Me

P=Past, N=New, S=Soon, F=Future

Type # next to movie to see showtimes, M to go back to the Main Menu or anything else to search again.

stop mocking me!

No movies matched your query. Try again or type main to return to main menu.

======= Movie of the Week =======
Reign Over Me - Movie Site

jerk
Pardon me? If you don't understand why I am not understanding you, just type, help.

======= Movie of the Week =======
Reign Over Me - Movie Site

help this, you insensitive clod!

K, I found a match. You used zip XXXXX last. To use it type Y. OR type in a new zipcode now and I'll see if this is playing near you.

Mailboxes Etc.

Sucks. And I’m an idiot for using them. I needed stamps. They were on the way. They charge 10 bucks for 20 stamps. I balked at first, but assumed I must be miscalculating. After I used one of the stamps, I got to doing the calculation… Hey, shouldn’t that be less than 8 bucks? D’oh! Note to self. Never buy stamps at Mailboxes Etc.

<EOL>