title: TraceBack (most recent call last), and GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) errors
body: <p>I have been struggling with a script that will turn a Pi's BCM pins 17, 27, and 10 on for 1 second then off for 1 second sequentially 100ish times. When I run the script LED1 will turn on and then it turns off and the program shuts down with this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "LedBlink.py", line 47, in &lt;module&gt;
      LED2Blink()
    File "LedBlink.py", line 27, in LED2Blink
      GPIO.setup(LED2, GPIO.OUT)
  RuntimeError: Please set pin numbering mode using     GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
  
  import RPi.GPIO as GPIO
  import time
  
  LED1 = 17
  LED2 = 27
  LED3 = 10
  
  GPIO.setmode(GPIO.BCM)
  
  def LED1Blink():
          GPIO.setup(LED1, GPIO.OUT)
          GPIO.output(LED1,True) 
          time.sleep(1)  
          GPIO.output(LED1,False)
          time.sleep(1)
          GPIO.cleanup()
  
  def LED2Blink():
          GPIO.setup(LED2, GPIO.OUT)
          GPIO.output(LED2,True) 
          time.sleep(1)  
          GPIO.output(LED2,False)
          time.sleep(1)
          GPIO.cleanup()
  
  def LED3Blink():
          GPIO.setup(LED3, GPIO.OUT)
          GPIO.output(LED3,True) 
          time.sleep(1)  
          GPIO.output(LED3,False)
          time.sleep(1)
          GPIO.cleanup()
  
  i = 0
  while i &lt; 100:
         LED1Blink()
         LED2Blink()
         LED3Blink()
         i + 1
  else:
         print "finished loop"
  </code></pre>