title: using GPIO to control raspberry picamera with push button
body: <pre><code>import time
  import os
  import RPi.GPIO as GPIO
  
  GPIO.setmode(GPIO.BCM)
  GPIO.setup(23 , GPIO.IN)
  
  while True:
  if GPIO.input(23)==1:
      os.system('raspistill -o image.jpg')
      os.system(‘gpicview image.jpg &amp;’)
      sleep(20)
      os.system(‘killall gpicview’)
  else:
      print "Ready to take picture"
  GPIO.cleanup()
  </code></pre>
  
  <p>Dear friends I'm trying to control raspberry picamera with a button.. like when i press the button it should take a picture. I configured GPIO pins also button when I press button nothing is working, however picamera taking photo itself. How can i make it work with button? any experts on python can guide me? thanks!</p>