coloradocube / balloonsat

COTS balloonsat mission to test the RPi 4 with a battery UPS, a quad camarray, a GPS module, a RockBLOCK module, and a small number of Qwiic sensors
0 stars 5 forks source link

FE v0.0.1 - Startup and shutdown with UPS #44

Closed ivogeorg closed 2 years ago

ivogeorg commented 2 years ago

Description

  1. Setup:

    1. Latest Raspbian OS image on Micro SD card.
    2. Python 3.9+.
    3. Connect UPS. image
      Note: There are no batteries in the UPS and the Qwiic hat with the attached sensors are not needed.
  2. Single process, single thread.

  3. Procedure:

    1. Turn on the UPS by pressing the blue button on the side of the batteries. This starts the RPi.
    2. Run fexecutive.py.
    3. It shuts down the RPi.
      1. Use Python subprocess package (from subprocess import run).
      2. Invoke run("shutdown --poweroff now", shell=True).
    4. Hold down the blue button of the UPS until it shuts down. The green battery lights remain on.

Knowledge

  1. Python subprocess package.
  2. Linux shutdown commands.

Deliverables

ivogeorg commented 2 years ago

Completed

  1. Power on UPS and RPi. image
  2. Shut down RPi. image
  3. Shut down UPS. The green lights remain on but turn off after a while. image