sudo apt-get update Then press ↵ Enter. This will update your software package lists so it can determine which programs need upgrading and which are already up-to-date.
sudo apt-get upgrade Then press ↵ Enter. This will upgrade your programs and operating system if newer versions are available.
The computer may prompt you that it needs to restart before changes can take effect. It will then ask if you want to restart the computer now, in which case, select Yes.
raspistill -o cam. jpg Then press ↵ Enter. The camera preview will turn on a second later it will snap a picture. It will be saved to your user’s home directory with the filename cam. jpg. You can replace cam. jpg in the above command with whatever filename you prefer so long as it ends with . jpg
Inkjet printers are usually less expensive and produce good photo-quality prints. However, they typically have slower print speeds and are deceivingly expensive when printing in large quantity. The photo paper is sold in sheets and the ink cartridges are sold separately by color. Laser printers have excellent print speeds but even color laser printers don’t normally produce photo-quality images nor do they print on photo paper. For color laser printers, the toner cartridges are also sold separately by color. Dye-sublimation printers provide excellent photo-quality prints, fast printing speeds, and vary greatly in price. The photo paper for dye-sublimation printers is sold with the exact amount of dye film needed to print the same amount of paper. For the more expensive high volume models, the paper and dye are sold together in rolls and the printer automatically cuts each photo off after printing. For the less expensive lower quantity models, the photo paper and dye are sold together in sheets.
sudo apt-get install cups Then press ↵ Enter and it will load the installation files. When prompted to proceed, type Y and press ↵ Enter. CUPS will begin the installation process which could take 15 minutes or longer.
sudo usermod -a -G lpadmin pi Then press ↵ Enter.
http://127. 0. 0. 1:631 Then press ↵ Enter. This will open the CUPS setup page in your browser.
The default username is pi and the default password is raspberry unless it was previously changed.
lpstat -p Then press ↵ Enter. This will return the name and status of the current default printer. The displayed printer name should be the one you designated earlier in the CUPS setup and the status should be “idle” if the printer is not in use.
ls Then press ↵ Enter. This will return a list of directories and files that are in the home directory. In the list you should find the filename of the picture you took earlier in the Connect the Camera Module section.
lp -d PRINTERNAME cam. jpg Instead of PRINTERNAME type in your own printer’s name and substitute cam. jpg with the filename of your picture, then press ↵ Enter. Your picture will print from the printer! Great work!
You can search places like Github. com for one that suits your needs, however this guide will use a program written by Kenneth Centurion, adorably named ‘boothy,’ as an example. It’s simple and fairly easy to understand and could be customized without too much programming knowledge. You can inspect the files and explore the code in your browser here: https://github. com/zoroloco/boothy.
cd /usr/local/src Then hit ↵ Enter. Clone the boothy repository to this folder by typing: sudo git clone git://github. com/zoroloco/boothy. git Then press ↵ Enter. This will copy the entire boothy depository and all it’s files to the directory you are currently in. Great work!
sudo chmod 777 -R /usr/local/src/boothy Press ↵ Enter.
sudo bash /usr/local/src/boothy/INSTALL. txt Press ↵ Enter. Be sure to respond to any prompts during the installation process. This step could take quite a while, so this would be a great time to grab a cup of coffee! Wait until all the packages are installed before continuing to the next step.
sudo nano /usr/local/src/boothy/run. sh Press ↵ Enter. This will open the file run. sh in a text editor within the terminal. Use the arrow keys to navigate and add a -i on the bottom line after the word “python” so the whole code appears as: #!/bin/bash # # chmod +x run. sh # # clear sudo python -i /usr/local/src/boothy/pbooth. py Press Ctrl+X and it will ask you if you want to save. Press y and press ↵ Enter.
/usr/local/src/boothy/run. sh
IMG1 = “1. jpg” IMG2 = “2. jpg” IMG3 = “3. jpg” CurrentWorkingDir= “/usr/local/src/boothy” IMG4 = “4logo. png” logDir = “logs” archiveDir = “photos” SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 IMAGE_WIDTH = 640 IMAGE_HEIGHT = 480 BUTTON_PIN = 26 LED_PIN = 19 #connected to external 12v. PHOTO_DELAY = 8 Changing the values of SCREEN_WIDTH and SCREEN_HEIGHT will determine the screen size the camera preview displays at. You can change this to match the resolution of the screen you will be using for your photobooth, however changing this may result in off-center titles for the text when the program is running. Those too can be changed but are more spread throughout the code so are harder to change. If you are printing 4x6 sized prints, changing the values of IMAGE_WIDTH and IMAGE_HEIGHT to 640 and 425 respectively, utilizes the page space more effectively. Changing the value ofPHOTO_DELAY which will determine how many seconds the timer counts down before each picture in a series. Change or replace the 4logo. png in the boothy directory to something that is personalized for your event or celebration.