Making My “Web”cam Photo Booth Halloween Costume

zetta punk
Nov 2 · 5 min read
Censored faces and written URL for pics taken at the party

Materials

TouchSelfie Open Source Software
Raspberry Pi 3 B+
Raspberry Pi 3.5" Touchscreen
1080p RPi Camera Module
Anker PowerCore 20100
Cardboard Box
Backpack Hip Straps
Decorative Spider Webs

Summary || tl;dr

I made a “web”cam photo booth for my Halloween costume. People could press a button on a touch screen attached to a Raspberry Pi and have a picture taken that would then be uploaded to a Google photo album. They could also take a burst of photos, make a gif, or use one of many photo effects. It made for a lot of fun conversations with techies and non-techies alike!


Full Story

The events that made this costume possible started back at DEF CON 27. I bought a limited-edition Hacker Box from www.hackerboxes.com. Inside, was a project hooking up an ESP32 chip to its own camera module, and flashing a camera web server on to the chip. Since I only had about 2 weeks until a Halloween party, I needed a costume before I was forced to buy a banana costume off of Amazon.

So, I set out to find some sort of costume I could make with the electronics in that kit along with the other ones I had. Since I was going to a party, I thought a photo booth would be a fun idea and an excuse to meet new people.

I tried Frankensteining something together with the ESP32 and my Raspberry Pi, but it would be too complicated for people to join the wifi network, type an IP address into their browser, and then use the clunky web server to take a still image and save it to their phone.

Then, I realized that the raspberry pi has a camera slot itself, and I could cut out the ESP32 and web server altogether. Then, it was just a matter of figuring out how to make it interactive with other party guests.

I brushed off my UX skills and drew up a list of features and priorities based on what I thought I could accomplish in the amount of time I had, which was a few days at this point.

  • Take a single photo — 1
  • Upload to a social media account for guest viewing — 1
  • Make a GIF — 2
  • Take a burst of photos — 3
  • Take a slow-mo — 3
  • Email a photo to a user-given email —X ( Probably not gonna happen)

I set to learning how to use the Pi’s camera module with python since that’s the language I’ve been learning, and was able to familiarize myself with using the CLI to control the camera in 20 minutes or so.

However, I didn’t think I could break past my number 1 priorities within the time allotted, so I looked around for an existing solution on Github, and found TouchSelfie. Luckily, it included a great set of features!

I followed the repository’s instructions on setting up the Google API for a Gmail account to send out photos and for Google Photos. That way, I would automatically upload every photo to a photo album on the cloud, or people could email themselves a certain photo.

I used URL shortening to make a short, memorable URL so that users didn’t have to clunkily enter a long Google photo album address in their phones.

Now, I had a working prototype!

TouchSelfie running on my Raspberry Pi 3+ B

The Build

Don’t forget to take any bezels on your screen into account for the hole!

The next step was to find a box big enough to house everything. I would have loved to make it smaller, but my only other power source available would have only run the rig for about 3 hrs vs. the near 24 hrs this pack could run it at. Then, I cut a hole for the screen with an x-acto knife near the bottom since I figured the Pi would rest on the battery pack.

Make sure to position the screen near the bottom of the front of the box!

I simply used a Dremel with a conical head to drill the hole. Of course, don’t forget to measure the diameter of the camera lens to be sure you get a snug fit!

Nice and snug!

Since the Pi and camera wouldn’t just stay in place as I moved, I had to secure them. I decided hot gluing cardboard pieces was a better option than simple electrical tape for the Pi because the weight could affect the ability of the tape to stay stuck to cardboard. When that wasn’t nearly as secure as I wanted it to be, I used a zip tie to cinch the sides around the Pi. Since the camera lens fit a bit snugly into its hole, I figured electrical tape would be enough. It was.

URL for album hidden under black bar

Now that everything was IN the box, and working. The final problem was how to attach it to my chest. The first solution was simply threading a belt through the slits in the bottom of the box where the sides of the box come together.

Janky cuts above the belt for ‘cooling’

That wasn’t comfortable enough for me, and it was a pain to remove. Luckily, I remembered a travel backpack I got recently had some removable hip straps. All it took was one more cut in the side of the box for the ends of the straps to be perfect!

Don’t cut too close to the edge so the hold is stronger.

The Final Product

Like some sort of fanny pack / photo booth hybrid!

Improvements || If I Had More Time

  • Add a flash by attaching some LEDs, attaching them to the Pi GPIO, and modifying the code to have them flash when a picture is taken. I used a small headlamp in the spider web (acting as a diffusor), but it wasn’t bright enough.
  • Spray paint the box black, and stretch out the web a bit more to make it look cooler
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade