Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79013

Re: what is wrong with this script and how do I get the value in a php script

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.python
Subject Re: what is wrong with this script and how do I get the value in a php script
Date Sun, 12 Oct 2014 18:36:08 +0000 (UTC)
Organization A noiseless patient Spider
Lines 32
Message-ID <m1ehmo$qr1$3@dont-email.me> (permalink)
References <05f27d81-372d-4242-bc62-e738e23680d4@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Sun, 12 Oct 2014 18:36:08 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="27489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/z33DyYX69WOJqXUPK2NcizUnzzL7c4yc="
User-Agent Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)
Cancel-Lock sha1:yoadLeV2l+k2grUehPF8RYDaDos=
Xref csiph.com comp.lang.python:79013

Show key headers only | View raw


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, denismfmcmahon@gmail.com

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

what is wrong with this script and how do I get the value in a php script martijnperdaan@gmail.com - 2014-10-12 07:24 -0700
  Re: what is wrong with this script and how do I get the value in a php script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-10-12 12:47 -0400
  Re: what is wrong with this script and how do I get the value in a php script Peter Pearson <pkpearson@nowhere.invalid> - 2014-10-12 17:01 +0000
  Re: what is wrong with this script and how do I get the value in a php script Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-12 18:36 +0000

csiph-web