2 Replies Latest reply on Feb 5, 2016 5:00 AM by geotheory

    MRAA button detect script unresponsive after some time


      I have an Edison (Yocto Poky on Sparkfun blocks) with a script running to detect button presses (using the GPIO block), which becomes unresponsive after some time (trying to pin down how long, but over an hour).  The python script is below, based on an example from https github.com/intel-iot-devkit/mraa/blob/master/examples/python/hello_isr.py :




      #!/usr/bin/env python

      import mraa

      import time

      import subprocess


      def press(args):

        subprocess.call("echo $(date) >> button_log.txt", shell=True)


      pin = mraa.Gpio(32)


      pin.isr(mraa.EDGE_BOTH, press, press)




      I have another bash script that detects if button.py has ended, and restarts a new instance if so.  This appears to work perfectly, and I've tested the button on an instance of button.py that was created by the bash script, and that worked ok.


      Any idea why this can become unresponsive?