On 13/04/17 17:10, marcus lütolf wrote:
> Dear experts, Mats
> I have found the solution, I put the counting variable at the wrong place:
I don;t think so, what you have done now is count the times
through the loop, but thats not (always) the same as the
number of times the function gets called,
ept KeyboardInterrupt:
> print('PIR deaktiviert')
Marcus.
-Ursprüngliche Nachricht-
Von: Mats Wichmann [mailto:m...@wichmann.us]
Gesendet: Montag, 10. April 2017 15:15
An: marcus lütolf ; tutor@python.org
Betreff: Re: [T
On 04/10/2017 01:55 AM, marcus lütolf wrote:
> Dear experts,
> I have written the following code for motion detection with a PIR sensor
> with a function and
> I need to count how many times the funtion is called, but I get a traceback:
>
> #!/usr/bin/python3
> import sys, time
> import RPi.GPIO a
On 10/04/17 08:55, marcus lütolf wrote:
> Dear experts,
> I have written the following code for motion detection with a PIR sensor
> with a function and
> I need to count how many times the funtion is called, but I get a traceback:
>
> #!/usr/bin/python3
> import sys, time
> import RPi.GPIO as gpi
Dear experts,
I have written the following code for motion detection with a PIR sensor
with a function and
I need to count how many times the funtion is called, but I get a traceback:
#!/usr/bin/python3
import sys, time
import RPi.GPIO as gpio
gpio.setmode(gpio.BOARD)
gpio.setup(23, gpio.IN)
coun