[ create a new paste ] login | about

Link: http://codepad.org/rqSrRqQx    [ raw code | fork ]

Python, pasted on Dec 31:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import RPi.GPIO as GPIO

GPIO.cleanup()

# Set pin numbering to match RasPi
GPIO.setmode(GPIO.BOARD)

# Set up the GPIO channels - one input and one output
GPIO.setup(8, GPIO.IN)
input_value = GPIO.input(8)

print input_value

GPIO.cleanup()


Create a new paste based on this one


Comments: