@@ -0,0 +1,701 @@
+import time%0Aimport picamera%0A#from datetime import datetime%0Afrom PIL import Image%0Aimport RPi.GPIO %0Aimport io%0Aimport os%0ALight = 17%0ARPi.GPIO.setmode(RPi.GPIO.BCM)%0ARPi.GPIO.setup(Light,RPi.GPIO.IN)%0A%0Acamera = picamera.PiCamera()%0A#timenow = datetime.now()%0A#filename = '/home/pi/instantp/' + %22inst.jpg%22#%22m%2502d%2502d%2502d.jpg%22 %25 (timenow.hour,timenow.minute,timenow.second)%0Adef newimage() :       %0A        camera.capture('/home/pi/inst.jpg')%0A        print %22captured %22 %0Awhile 1:%0A%0A%09if  RPi.GPIO.input(Light)!=1:    #if the level is high, take N pictures%0A%09%0A%09%09os.remove('/home/pi/inst.jpg') %0A%09%09newimage()%0A%09%09time.sleep(10)%0A%09%09os.system('export PRINTER=pi1010')%0A%09%09os.system('lp -d pi1010 inst.jpg')%0A%09%09time.sleep(40)%0A%09%0A%0A

Create instantcamera.py