On Sun, 12 Oct 2014 07:24:52 -0700, martijnperdaan wrote:

> what is wrong with this script and how do I get the value Rij1 and Rij2
> and Rij3 and Rij4 and Rij5 and Rij6 in a php script

I can see several pythonic errors in your script, however as for "what is 
wrong", I see no indication from you of what you expect it to do, what 
output you expect, what error messages you get when you try and run it 
etc.

Perhaps a better subject would have been "how to read gpio on raspberry 
pi"

It also helps if you can reduce your code example to the minimum needed 
to demonstrate the error. In this case, I would suggest that once you can 
read one input correctly, you should be able to expand that code to read 
all inputs.

The code below might help (uses 2.x style print):

import RPi.GPIO as GPIO

GPIO.setmode(mode)
GPIO.setup(17, GPIO.IN)

if GPIO.input(17) == GPIO.HIGH:
    print True
else:
    print False

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to