Advertisement
Guest User

Untitled

a guest
Jun 24th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. pi@raspberrypi ~ $ sudo python
  2. Python 2.7.3 (default, Mar 18 2014, 05:13:23)
  3. [GCC 4.6.3] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import RPi.GPIO as GPIO
  6. >>> GPIO.setup(22, GPIO.OUT)
  7. Traceback (most recent call last):
  8. File "<stdin>", line 1, in <module>
  9. RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
  10. >>> GPIO.setmode(GPIO.BOARD)
  11. >>> GPIO.setup(22, GPIO.OUT)
  12. >>> GPIO.output(22, True)
  13. >>> GPIO.setup(15, GPIO.OUT)
  14. >>> GPIO.output(15, False)
  15. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement