raspberry gpio tutorial 2.. getting input using switch in tamil
python codings
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.IN)
while 1:
if GPIO.input(17):
print 'button pressed'
time.sleep(1)
else:
print 'button not pressed'
time.sleep(1)
***************************************************************************************************************
copy that and paste in your python idle