title: Running Python script causes Raspberry Pi to lose power
body: <p>I've created the following script:</p>
  
  <pre><code>import RPi.GPIO as GPIO
  import time
  GPIO.setwarnings(False)
  GPIO.cleanup()
  GPIO.setmode(GPIO.BCM)
  GPIO.setup(15,GPIO.OUT)
  GPIO.output(15,False)
  GPIO.setup(6,GPIO.IN,pull_up_down=GPIO.PUD_DOWN)
  while GPIO.input(22) == GPIO.LOW:
      time.sleep(0.1)
      if GPIO.input(6)==GPIO.HIGH:
              print("YAY")
  </code></pre>
  
  <p>The purpose of this code is to detect the press of a button connected to my Raspberry Pi, but even without any circuitry set up, just starting this script causes the pi to lose power. Does anyone have any ideas why this may be and how to fix it?</p>