-
Notifications
You must be signed in to change notification settings - Fork 0
Develop Scripts for Shut Down and Restart of Pi via GPIO status #16
Comments
See this link from the element14 community. I am assigning
|
Note: GPIO pins must be configured with internal pull-up resistances enabled, like so:
|
Can we have some sort of indicator (an LED?) onboard that can let us know the process has begun? |
Yeah we can, as described here. We will use
I propose a different blinking pattern depending on what script (reset or shutdown) you run. Perhaps solid for shutdown and blink for reset? |
That is, I would set pin 7 high during shutdown and it would turn off when the Pi powers off? For reset, some odd pattern of highs and lows (e.g. (high + low)* + high + off)? |
Yessir! |
Let's not be at that. How about using:
from the |
Won't that mean that the LED will only light up for a brief period of time as the unit is powering down, and will do the same thing regardless of reset or shutdown? |
Thinking about it more, I think what I proposed above should be fine for our purposes. GPIO 4 will be high long enough for us to notice it. We can use that pin in addition to the red and green lights onboard the Pi itself (it's not like it's underwater 😏). I think having that information will be more than enough to determine if the Pi is responding to the buttons. As for knowing when the Pi is back in action, if I were to schedule a light or something to notify us, it'd be scheduled for the exact same time the control software starts up, at which point we may as well use any number of other factors to know whether it's working. If we really want some indication that the Pi is up and running, we can open up a new issue to add something to the control software proper. |
Absolutely fine for now but when we change enclosures there are no guarantees that it will be transparent. The LED is to be mounted in the enclosure lid to give us that indication at that point.
Such as? Also we can divert this to a new issue if you would like, but we'll push it to the next release post 1.2 bug fixes. Cool? |
One possible example would be the the boat sending its position to the shore—no positions, no boat. I admit it's not foolproof—if we want a "hardware" indication, we can have the control software do something (I'd be open to whatever, even if it's another LED) though I think that merits its own issue. |
Moving indicator LED discussion to #24 |
In order to provide a method for safetly shutting down or restarting the pi, we need the ability to initiate a safe shutdown from the outside of the boat without needing to be communicating with it from Shoreside.
This is best implemented using buttons attached to the GPIO pins. I will provide hardware required for this.
Proposal:
The text was updated successfully, but these errors were encountered: