• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    gpio shutdown from within mycontroller?

    scheduled pinned locked moved Developers Zone
    4 posts 2 posters 844 views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • skywatchS offline
      skywatch
      global:last-edited-by, skywatch

      Hi,

      I am looking to shutdown the mycontroller pi properly remotely using a signal from a sensor.

      There are 2 pins on the pi which will shut it down, but I don't know how this will work with mycontroller and mcagent running. I think it would be better to stop these services first and then power off the pi.

      So my thinking is that I can send a high or low to the pi gpio, have mcagent monitor and detect the change and then trigger a python script to shutdown the pi?

      Is it possible?

      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @skywatch
        global:last-edited-by,

        @skywatch Hi, For now, I could not find a direct way for this. I will check the possible way and let you know.
        Thank you for your patience.

        skywatchS one-reply-to-this-post last-reply-time reply quote 0
        • skywatchS offline
          skywatch @jkandasa
          global:last-edited-by,

          @jkandasa Thanks for thinking about it.

          It is really not a problem, more a case of ''I wonder if that would be possible". I can load a python script at startup and use that to monitor the gpio pins to run the shudown script.

          Do you think it will be an issue with mcagent also running? Could there be a conflict with both python and mcagent trying to access the gpio ports?

          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
          • jkandasaJ offline
            jkandasa @skywatch
            global:last-edited-by,

            @skywatch

            Do you think it will be an issue with mcagent also running? Could there be a conflict with both python and mcagent trying to access the gpio ports?

            If you access the same pin from both side(Python and mcagent), it may conflict. Otherwise no issue.

            one-reply-to-this-post last-reply-time reply quote 0
            • first-post
              last-post

            0

            online

            644

            users

            532

            topics

            3.4k

            posts
            Copyright © 2015-2025 MyController.org | Contributors | Localization