Loading ...
Sorry, an error occurred while loading the content.

Re: [Raspberry_Pi_4-Ham_RADIO] Raspberry Pi with battery backup

Expand Messages
  • Jeff Francis™
    Here s a nice page showing how to do I/O from a number of different scripting languages, including simple shell scripts. Should have everything you need:
    Message 1 of 8 , Jan 8, 2013
    • 0 Attachment
        Here's a nice page showing how to do I/O from a number of different scripting languages, including simple shell scripts.  Should have everything you need:


      On Mon, Jan 7, 2013 at 6:48 AM, David Kjellquist <dave@...> wrote:

      Here is a thread that provides all the needed shell scripts for watching a GPIO pin for reset (-r) or shutdown(-h).  I am using the watch_reset.sh with rc.local mods in my remote antenna switch for rebooting if the client-server connection gets hosed.   Be careful modding rc.local since it can cause booting to lockup. If you do mess up and boot fails, simply remove the SD card go to another computer with a card reader, mount the card and fix /etc/rc.local


      On 1/7/2013 5:22 AM, Dave B wrote:

      On 6 Jan 2013 at 11:28, Raspberry_Pi_4-Ham_RADIO@yahoogroups.com wrote:

      > __________________________________________________________
      > Re: Raspberry Pi with battery backup
      > Posted by: "Jeff Francis¢" jeff@... jeffrey_francis
      > Date: Sat Jan 5, 2013 8:10 pm ((PST))
      > If all you want to do is monitor the status of a single GPIO pin,
      > all it takes is a half dozen lines of bash script shoved into a
      > crontab. If you actually want to monitor a commercial UPS, there
      > are packages like apcupsd.


      For the Bash/Cron challenged amongst us, how about an example to chew on?
      Please... In regards to monitoring a GPIO pin that is via Bash/Cron.

      (There are just tooooooo many often conflicting hits when googling for
      that sort of thing.)

      There is a lot of interest in using the Pi on battery power, so something
      like that could be very useful to have an example of (however crude at
      first) so an orderly shutdown can be done, before the lights become too

      Perhaps also, at the last gasp, to flip another GPIO pin, to actually
      disconnect the supply (by FlipFlop and power fet?) from the Pi, so though
      the OS is killed of, the Pi's residual power consumption doesn't wreck
      the (otherwise still connected) batteries. Said FlipFlop could be
      toggled back to the "Power ON" state by hardware when the batteries have
      recovered enough (if unatended use is needed) or by mk1 push button.


      Dave (G0WBX)

    Your message has been successfully submitted and would be delivered to recipients shortly.