-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
748 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.8.4 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.PHONY: format, pre_commit, test | ||
|
||
SHELL=/bin/bash | ||
|
||
format: | ||
poetry run ruff format . | ||
|
||
pre_commit: | ||
poetry run pre-commit install | ||
|
||
test: | ||
poetry run pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
# rpi-camera-apps | ||
Raspberry Pi apps that use the camera module | ||
Raspberry Pi apps that use the camera module. | ||
|
||
## Support | ||
- Not compatible with Python2. | ||
- Compatible with Raspbian Buster, and requires the Picamera module. | ||
- Has not been tested on Raspbian Bullseye due to deprecation of Picamera. I hope to migrate to Bullseye once Picamera2 has a stable release. | ||
## Dependencies | ||
|
||
This project uses Picamera2, and therefore only supports Raspberry PI OS Bullseye or later. | ||
See [here](https://github.com/raspberrypi/picamera2) for instructions for installing Picamera2. | ||
|
||
I am using Poetry for dev dependencies only right now. I have not gotten | ||
Poetry to work nicely and use the system installed Picamera2 package and | ||
its dependencies. Trying to install Picamera2 and dependencies purely | ||
through Poetry ends up freezing the Pi. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import time | ||
|
||
from picamera2 import Picamera2 | ||
|
||
if __name__ == "__main__": | ||
with Picamera2() as picam2: | ||
camera_config = picam2.create_preview_configuration() | ||
picam2.configure(camera_config) | ||
picam2.start() | ||
time.sleep(2) | ||
picam2.capture_file("test.jpg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.