Smile Station

Photo booth that is very portable and configurable.

Similar projects worth following
This is a photo booth built from a raspberry pi and camera board. No printer on it to make it better at being portable and less problematic. It has a 7 inch screen, red lite button, a bunch of 3d printed parts, hacked router for uploading to Gmail, Facebook, Flickr, and/or downloading with samba... Fun Times...

I have finished this photo booth and it works great. As of now I have scripts set up for up-loading and stand alone . I can control it from a secondary computer with putty and Winscp or from the screen with the wireless keyboard. I don't have photos of every thing but I did get photos in different stages that can be used for reference. I will work on getting more or better photos on my next projects....

  • 1 × Rapberry pi 512 model
  • 1 × RPI camera board Not the infra type
  • 1 × sd card any type that works
  • 1 × 7 inch lcd screen from ebay migh be better to get a hdmi one I did not
  • 1 × lighted red arcade button any off ebay

View all 16 components

  • 1
    Step 1

    First I got the RPI set up with the latest and greatest Raspian. Make sure that you up-date up-grade and set the GPIO and Camera in raspi-config. This site has all the information that I started off with even the code I used to get it working at first ( I added stuff to this code to get it to do what I needed it to do I will add this info later.

    Make sure that you get the button working that is important.

  • 2
    Step 2

    On this next link is where I got the info for sending the photos taken with its own email account .

    I tested it by copying the script to send attachments in to the python editor on the rpi by first opening the python editor and then open a new scripting page so you can paste in the whole script at once and run it ( make sure you fill in all the necessary info first or it will not work email address,  where to send it to, etc) I have a dedicated email address for this project you don't have to but it might be best. I will post my script in the next step (3).

    I also started working on the body of my photo booth. I am using a concrete forming tube, blue foam board, and PVC pipe from Lowes for the body. The tube was 4' tall by 12" round. I cut 12" off the 4' tube to give me a head. The photo below shows how I was headed. I used the head as my blue foam templit for cutting.

    You will need at least 4 blue foam board round cut outs. In this photo I noticed that it might be more stable with the head laying side ways and it looks better.... so this is the way it stayed.

  • 3
    Step 3

    Well in this step I will focus on the code and getting it to work with Facebook and Flickr ....


    #!/usr/bin/env python

    # this file is run using this command: "sudo python"

    # python must be installed, and you must call the command while

    # you are in the same folder as the file

    from time import sleep

    import smtplib

    from email.MIMEMultipart import MIMEMultipart

    from email.MIMEBase import MIMEBase

    from email.MIMEText import MIMEText

    from email.Utils import COMMASPACE, formatdate

    from email import Encoders

    import os

    import RPi.GPIO as GPIO

    import subprocess

    import datetime

    # set up the pins





    GPIO.output(23, True)

    # setup variables

    USERNAME = ""

    PASSWORD = "emailpassword"

    count = 0

    up = False

    down = False

    command = ""

    filename = ""

    index = 0

    camera_pause = "3000"

    print "Raspberry Pi Camera with Buttons"

    def takepic(imageName):


    command = "sudo raspistill -o " + imageName + " -q 100 -t " + camera_pause

    print("After your photo is taken please give it a sec to send and save")


    def sendMail(to, subject, text, files=[]):

    assert type(to)==list

    assert type(files)==list

    msg = MIMEMultipart()

    msg['From'] = USERNAME

    msg['To'] = COMMASPACE.join(to)

    msg['Date'] = formatdate(localtime=True)

    msg['Subject'] = subject

    msg.attach( MIMEText(text) )

    for file in files:

    part = MIMEBase('application', "octet-stream")

    part.set_payload( open(file,"rb").read() )


    part.add_header('Content-Disposition', 'attachment; filename="%s"'

    % os.path.basename(file))


    server = smtplib.SMTP('')





    server.sendmail(USERNAME, to, msg.as_string())





    GPIO.output(23, False)


    now =

    timeString = now.strftime("%Y-%m-%d_%H:%M:%S")

    print("request received" + timeString)

    filename = "photo-" + timeString + ".jpg"


    sendMail( [""],

    "test set up for photo booth",

    "Test picture attached",

    ["/home/pi/photos/photo-" + timeString + ".jpg"] )

    print "Ready"

    GPIO.output(23, True)

    up = GPIO.input(24)

    count = count +1


    # this is never hit, but should be here to indicate if you plan on leaving the main loop

    print "done"


    It does not look as good on here as it does in IDLE and I dont think you can copy and past it. so I am in the work of getting a place I can post my files for links to them like for here at hack a day.

    I will use it to show where to make changes to make this work. Oh I did not make this script I just copied pices of it to smash it together to make it work for me.   

    # set up the pins



    GPIO.setup(24,GPIO.IN)    <- Button input 

    GPIO.setup(23,GPIO.OUT) <- Lite on the button

    GPIO.output(23, True) <- turn lite on 

    # setup variables

    USERNAME = "" < -you need to put you email you set up                                                                      for this thing here

    PASSWORD = "password" <- password for that email address 

    count = 0 <-starts photo count at 0 

    up = False

    down = False

    command = ""

    filename = ""

    index = 0

    camera_pause = "3000" <- how much time it will preview


    command = "sudo raspistill -o " + imageName + " -q 100 -t " + camera_pause <- ok this is the command that is sent to take the photo. (I know now htey have this worked out to do this in python with out using os.system .) you can add options on here from the camera info like polerize of sketch. this is just like typing it in the terminal prompt. 


    sendMail( ["the"], <- they will give you a                                                                                                   email to send to                                                                                                         Flickr does the                                                                                                             same thing

    "test set up for photo booth", <- this can be any thing I see it on facebook as                                                        the photo comments. I have thought to use                                                          "photo-" + timeString + ".jpg" to see what                                                               happens .

    "Test picture attached",  <- so far I have not seen it in any photo so does not                                                 matter what it is.   I think ?

    ["/home/pi/photos/photo-" + timeString + ".jpg"] )   <- this is where the file is                                                                                              to send it

    You can see from the web sites what I copies and what I didn't. With Facebook and Flickr having email uploading makes this work out great....

View all 5 instructions

Enjoy this project?



Bobby Feather wrote 04/12/2016 at 21:34 point

It was my first time doing any thing like this. I did finish the project, Just have not updated the page yet with the info. It turned out to be very hard to get from place to place, and it takes up to much room in my living room to store it when I'm not using it. I saw a build that your phone could connect to I might try to . I might try to edit the code to print out the photos and still email or upload it to face book they really were not a great photos eather. The lighting was off a lot or it might make the photo real red or yellow....I have another project I'm working on if you would like to look at that one. I could use help with my code it 7 years old and its made with parts of old code so it has stuff that needs updated. I have only updated it to work with the newest arduino IDE....take a look 

  Are you sure? yes | no

Ar wrote 05/03/2016 at 03:18 point

Hi! I didn't even get notified you replied, just saw your message =( There's the "Reply" button, it's super convenient because it's got notifications attached to it. Please do use it.

You could make it inflatable, I guess =) I could take a look at that code in my spare time. Reply to this with a link, or, better, send me a private message.

  Are you sure? yes | no

Ar wrote 04/12/2016 at 01:28 point

Hi! Just a friendly suggestion - you could put your Python code in a build log, and link to it from the instructions, since page feels cluttered and code is kinda hard to read with this approach =) 

Generally, build instructions are to be short. Build logs, however, are meant to be long - and they do have much more features, such as code highlighting, which amazingly improves readability!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates