Introduction: Instant Photo Printer
Instant Photo Printer is an instant camera.But it’s not a normal instant camera.It takes a picture when you scream or laugh loudly.
Power adapter Pi
Step 1: Step 1: Setting Up the Raspberry Pi
The very first step is to install operating system.You can get some help from google and follow the instructions before turning on the Pi.
Plug some peripherals into the Raspberry Pi .Start by plugging the keyboard, mouse, and external monitor into the Pi. The Pi might need to update itself, so instead of plugging in the wireless adapter, try plugging it into your network with an ethernet cable at this point.
$ sudo apt-get update$ sudo apt-get upgrade
Step 2: Step 2: Setting Up the Camera Module
When you get to a blue screen that asks you to configure the options with which Raspbian is configured, there are one options you need to set: “camera” should be enabled.
If you don’t see a blue screen,type this command.
$ sudo raspi-config
Then enable camera
Step 3: Step 3: Setting Up CUPS to Print
My printer is HP Deskjet1010
CUPS is the standards-based, open source printing system developed by Apple Inc. for OS Xand other UNIX-like operating systems. CUPS uses the Internet Printing Protocol（IPP）to support printing to local and network printer. Installation aptitude update aptitude install cups cups-client Start the software /etc/init.d/cups start Add Printer，Connecting to printer with a web brower.Typing your IP address in browser. http://localhost:631/ If you get a permission error, try adding yourself to the group lpadmin. E.g. if you are user "tom": sudo usermod -a -G lpadmin picamera
No Printer Drivers
Most of the more common printer should already have drivers in cups system. For the newer or more commercial once see the manufacture website. You should look for the PPD file of your printer model. The PPD file describes the capabilities of the printer. For a comprehensive review and database of printer models, drivers and PPD files see http://www.linuxprinting.org · Is the printer running? lpstat -r · What is the default printer? lpstat -d · Printer queue lpq You can configure your printer in brower Choose “administration”
Click the "printers" tab and find the driver for your printer model. Install it, then print a test page.
If you have some problems,you can find some help in https://wiki.debian.org/SystemPrinting
Step 4: Step 4: Setting Up the Python GPIO
Installing the Python Development toolkit that RPi.GPIO uses and then the GPIO package itself.
$sudo apt-get install python-dev
$tar xvzf RPi.GPIO-0.5.3a.tar.gz
$ sudo python setup.py install Now,you can run a project to test it.The code is here.Then connecting a led to pin 17 and blinking it. import RPi.GPIO as GPIO
def blink(times, delay):
if __name__ == '__main__':
If it work,you can connect the sound sensor to pi.Screaming loud enough, the led will blink.You can adjust the rheosta to set an appropriate value.
Step 5: Step 5:Finished
The last step is taking a photo with picamera and printing it.Then,screaming. You can design a lovely case and print it with 3D printer.
Here is the GitHub repository for some of the scripts that I reference, and am adding to.If some codes update,you can follow.