ik krijg dezen programma niet werketen op me rasberry pi
# Doorbel py with read contact uitlezen,
# GPIO 18 to Ground when button is pushed
# Release 0.1/
# Author J. Jeurissen
# Copyright (c) 2015 J. Jeurissen
# Python 3
import urllib
import urllib.request
import json
import RPi.GPIO as GPIO
import time
# Settings for the domoticz server
domoticzserver="192.168.0.113:8080"
domoticzusername = ""
domoticzpassword = ""
domoticzurl ='http://192.168.0.113:8080/json.htm?type=command¶m=switchlight&idx=71&switchcmd=On'
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(18)
if input_state == False:
print('Button Pressed')
time.sleep(5.0)
@reboot python3 /path/doorbel.py
wie kan mij op weg helpen
# Doorbel py with read contact uitlezen,
# GPIO 18 to Ground when button is pushed
# Release 0.1/
# Author J. Jeurissen
# Copyright (c) 2015 J. Jeurissen
# Python 3
import urllib
import urllib.request
import json
import RPi.GPIO as GPIO
import time
# Settings for the domoticz server
domoticzserver="192.168.0.113:8080"
domoticzusername = ""
domoticzpassword = ""
domoticzurl ='http://192.168.0.113:8080/json.htm?type=command¶m=switchlight&idx=71&switchcmd=On'
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(18)
if input_state == False:
print('Button Pressed')
time.sleep(5.0)
@reboot python3 /path/doorbel.py
wie kan mij op weg helpen