Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79001
| X-Received | by 10.42.207.146 with SMTP id fy18mr7119532icb.12.1413123893006; Sun, 12 Oct 2014 07:24:53 -0700 (PDT) |
|---|---|
| X-Received | by 10.140.93.79 with SMTP id c73mr4262qge.9.1413123892975; Sun, 12 Oct 2014 07:24:52 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h18no4994772igc.0!news-out.google.com!i10ni84qaf.0!nntp.google.com!dc16no2316689qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Sun, 12 Oct 2014 07:24:52 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=82.171.116.7; posting-account=SvsY3AoAAAApoc9RJ1NI48lg0FEf_T0Q |
| NNTP-Posting-Host | 82.171.116.7 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <05f27d81-372d-4242-bc62-e738e23680d4@googlegroups.com> (permalink) |
| Subject | what is wrong with this script and how do I get the value in a php script |
| From | martijnperdaan@gmail.com |
| Injection-Date | Sun, 12 Oct 2014 14:24:52 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:79001 |
Show key headers only | View raw
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
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(21, GPIO.IN)
GPIO.setup(22, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(24, GPIO.IN)
Rij1 = 0
Rij2 = 0
Rij3 = 0
Rij4 = 0
Rij5 = 0
Rij6 = 0
while True:
PRij1 = GPIO.input(17)
PRij2 = GPIO.input(18)
PRij3 = GPIO.input(21)
PRij4 = GPIO.input(22)
PRij5 = GPIO.input(23)
PRij6 = GPIO.input(24)
if (PRij1 == False):
Rij1 = Rij1 + 1
while PRij1 == False:
PRij1 = GPIO.input(17)
if (PRij2 == False):
Rij2 = Rij2 + 1
while PRij2 == False:
PRij2 = GPIO.input(18)
if (PRij3 == False):
Rij3 = Rij3 + 1
while PRij3 == False:
PRij3 = GPIO.input(21)
if (PRij4 == False):
Rij4 = Rij4 + 1
while PRij4 == False:
PRij4 = GPIO.input(22)
if (PRij5 == False):
Rij5 = Rij5 + 1
while PRij5 == False:
PRij5 = GPIO.input(23)
if (PRij6 == False):
Rij6 = Rij6 + 1
while PRij6 == False:
PRij6 = GPIO.input(24)
Totaal = Rij1 + Rij2 + Rij3 + Rij4 + Rij5 + Rij6
print Totaal
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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