Hi,
I’m using Bottle: Python Web Framework to control a relay on the raspberry pi. When I start the python script everything runs fine, but after a certain time (half an our or so) the pi freezes completely.
from bottle import route, run
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(5, GPIO.OUT)
@route('/on')
def on():
GPIO.output(5,GPIO.LOW)
return("ON")
@route('/off')
def off():
GPIO.output(5,GPIO.HIGH)
return("OFF")
@route('/status')
def status():
return GPIO.input(5)
run(host="0.0.0.0", port=8070)
anyone with more python experience that can give a helping hand?