geerlingguy / geerlingguy/pi-camera
Add 2nd button for power control
- Dominant language
- Python
- Stars
- 135
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Right now I have my Pi Camera set up to connect to my WiFi network. So when I want to shut it down, I go to another computer, log in via SSH, and run `sudo shutdown`. I could also create some sort of button on the touchscreen to shut it down, but that's fairly complicated too.
Especially if we get an improvement like #2 and I can use an 18650 cell to power the camera, it would be nice to have a separate power button.
- If the Pi is powered off:
- The power button, when pressed, will provide power to the Pi.
- If the Pi is powered on:
- The power button, when pressed, will safely quit the `camera.py` script/app, and then safely shut down the Pi, and disconnect power entirely (to avoid the battery draining when off).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating camera.py and reviewing how the camera app currently exits. Then research the Pi's power-control hardware and how a button can safely trigger shutdown and disconnect battery power. Done means the button powers on the Pi when off and safely exits camera.py, shuts down the Pi, and disconnects power when on.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, raspberry-pi
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100