Hi to all
Is there a possibility to make a log file from the pir now everything is on the screen but i want the output in a log file is that possible?
This i my standard:
# HC-SR501 motion sensor
# https://raspberrytips.nl/hc-sr501-beweg ... pberry-pi/
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
PIN = 26
GPIO.setup(PIN, GPIO.IN)
print "Start sensor..."
time.sleep(2)
print "Sensor alarm geactiveerd let op!.."
while True:
if GPIO.input(PIN):
print "Let op er zijn mensen buiten de afgesproken tijd lokatie Tilburg " + (time.strftime("%H:%M:%S")) This line in a log file
time.sleep(2)
time.sleep(0.1)