Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi ~ $ sudo python
- Python 2.7.3 (default, Mar 18 2014, 05:13:23)
- [GCC 4.6.3] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import RPi.GPIO as GPIO
- >>> GPIO.setup(22, GPIO.OUT)
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
- >>> GPIO.setmode(GPIO.BOARD)
- >>> GPIO.setup(22, GPIO.OUT)
- >>> GPIO.output(22, True)
- >>> GPIO.setup(15, GPIO.OUT)
- >>> GPIO.output(15, False)
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement