• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    gpio shutdown from within mycontroller?

    Developers Zone
    2
    4
    180
    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.
    • skywatch
      skywatch 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?

      jkandasa 1 Reply Last reply Reply Quote 0
      • jkandasa
        jkandasa @skywatch 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.

        skywatch 1 Reply Last reply Reply Quote 0
        • skywatch
          skywatch @jkandasa 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?

          jkandasa 1 Reply Last reply Reply Quote 0
          • jkandasa
            jkandasa @skywatch 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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            0
            Online

            647
            Users

            506
            Topics

            3.3k
            Posts

            Copyright © 2015-2022 MyController.org | Contributors | Localization