<reponame>balaji303/RaspberryPi
from gpiozero import Button
from picamera import PiCamera
button=Button(21)
camera = PiCamera()
camera.start_preview()
frame=1
while True:
    button.wait_for_press()
    camera.capture('/home/pi/frame%03d.jpg'%frame)
    frame+=1
from gpiozero import Button
from picamera import PiCamera
button=Button(21)
camera = PiCamera()
camera.start_preview()
frame=1
while True:
    button.wait_for_press()
    camera.capture('/home/pi/frame%03d.jpg'%frame)
    frame+=1