• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Bottle py - freezes raspberry pi

Scheduled Pinned Locked Moved Troubleshooting
1 Posts 1 Posters 1.0k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kclemen
    last edited by Aug 30, 2017, 3:55 PM

    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?

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Enjoying MagicMirror? Please consider a donation!
    MagicMirror created by Michael Teeuw.
    Forum managed by Sam, technical setup by Karsten.
    This forum is using NodeBB as its core | Contributors
    Contact | Privacy Policy