{"id":28206685,"url":"https://github.com/iwatake2222/digitalcamera_raspberrypi","last_synced_at":"2025-10-17T02:22:34.402Z","repository":{"id":93745207,"uuid":"112749169","full_name":"iwatake2222/DigitalCamera_RaspberryPi","owner":"iwatake2222","description":"A project to create a digital camera with Raspberry Pi in Linux standard way such as ioctl","archived":false,"fork":false,"pushed_at":"2017-12-04T19:31:07.000Z","size":528,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T14:43:41.496Z","etag":null,"topics":["cpp","devicedriver","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iwatake2222.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-01T14:30:02.000Z","updated_at":"2023-09-07T19:29:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"46d37e13-a67e-4710-b260-9c13b6a4fc19","html_url":"https://github.com/iwatake2222/DigitalCamera_RaspberryPi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iwatake2222/DigitalCamera_RaspberryPi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwatake2222%2FDigitalCamera_RaspberryPi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwatake2222%2FDigitalCamera_RaspberryPi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwatake2222%2FDigitalCamera_RaspberryPi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwatake2222%2FDigitalCamera_RaspberryPi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwatake2222","download_url":"https://codeload.github.com/iwatake2222/DigitalCamera_RaspberryPi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwatake2222%2FDigitalCamera_RaspberryPi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279272249,"owners_count":26138087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","devicedriver","raspberrypi"],"created_at":"2025-05-17T10:10:14.936Z","updated_at":"2025-10-17T02:22:34.395Z","avatar_url":"https://github.com/iwatake2222.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digital Camera with Raspberry Pi in Linux Standard Way\r\nThis is a Raspberry Pi Project to create a digital camere in Linux standard way.  \r\nDevice files and related system calls (open/write/ioctl/select) are used to access devices instead of using external libraries or OpenCV. To access a camera from C++ userland, I use  Video 4 Linux Two (V4L2) API.\r\n\r\n[Link to Youtube Video](https://youtu.be/xP2iDa2bzRc)  \r\n\u003cimg src = \"01_doc/pic_all.jpg\" width=80%\u003e\r\n\r\n\u003ctable\u003e\u003ctr\u003e\r\n\u003ctd\u003e\u003cimg src = \"01_doc/pic_front.jpg\"\u003e\u003c/td\u003e\r\n\u003ctd\u003e\u003cimg src = \"01_doc/pic_back.jpg\"\u003e\u003c/td\u003e\r\n\u003c/tr\u003e\u003c/table\u003e\r\n\r\n\r\n## Specs\r\n- Liveview (around 20fps)\r\n- Still capture (320 x 240 JPEG file)\r\n- Playback (JPEG file)\r\n\r\n## Devices\r\n- Raspberry Pi Zero W\r\n\t- can be work on Pi2/3\r\n\t- OS: 2017-09-07-raspbian-stretch-lite\r\n- 2.8 inch Display (LCD) Module\r\n\t- 320 x 240\r\n\t- ILI9341 SPI interface\r\n- Touch Panel (TP)\r\n\t- TSC2046 SPI interface (ADS7846 compatible)\r\n- Camera\r\n\t- Raspberry Pi Camera V2\r\n\r\n\r\n## Overview\r\n\u003cimg src = \"01_doc/overview.jpg\"\u003e\r\n\r\nNote: LCD(spidev0.0) and TP(spidev0.1) share SCK/MISO/MOSI.\r\n\r\n### Software Modules\r\n- App\r\n\t- Application main class\r\n\t- treats user input from TP module, and manages mode (liveview/playback)\r\n\t- creates/deletes an appropreate control class (CameraCtrl and PlaybackCtrl are ready so far)\r\n- CameraCtrl\r\n\t- A class to control liveview and capture\r\n- PlaybackCtrl\r\n\t- A class to control playback\r\n\t- uses libjpeg\r\n- DdCamera\r\n\t- A class to access camera module using video device file (v4l2)\r\n- DdIli9341Spi\r\n\t- A class to access LCD using SPI and GPIO device files\r\n- DdTpTsc2046Spi\r\n\t- A class to access Touch Panel using SPI and GPIO device files\r\n\r\n### Hardware Connection\r\n- LCD (SPI0.1 (/dev/spidev0.0))\r\n\t- LCD_SCLK: SPI0_SCLK\r\n\t- LCD_MOSI: SPI0_MOSI\r\n\t- LCD_MISO: SPI0_MISO\r\n\t- LCD_CS: SPI0_CE0_N \r\n\t- DC: GPIO 26 (/sys/class/gpio/gpio26)\r\n\t- VDD, LED, RESET: 3.3V\r\n\t- GND: GND\r\n- TP (SPI0.1 (/dev/spidev0.1))\r\n\t- TP_SCLK: SPI0_SCLK\r\n\t- TP_MOSI: SPI0_MOSI\r\n\t- TP_MISO: SPI0_MISO\r\n\t- TP_CS: SPI0_CE1_N\r\n\t- IRQ = GPIO 19 (/sys/class/gpio/gpio19)\r\n- Camera (/dev/video0)\r\n\t- CSI port \r\n\r\n## How to run\r\n- Enable Camera and SPI from `sudo raspi-config`\r\n- If you want to just run the application\r\n\t- `sudo apt-get install libjpeg-dev`\r\n\t- `make`\r\n\t- `sudo modprobe bcm2835-v4l2`\r\n\t- `./a.out`\r\n- If you want the application to start automatically\r\n\t- `sh ./install.sh` to install, which does:\r\n\t\t- build the project\r\n\t\t- install libjpeg\r\n\t\t- setup cron for auto start\r\n\t- reboot by `sudo reboot yes`\r\n\r\n### how to control\r\n- Photo Capture: Tap around the center during liveview mode\r\n- Mode change: Tap any corner or edge\r\n- Playback next picture: Tap around the center during playback mode\r\n\r\n## Note for debug\r\n```\r\nsudo modprobe bcm2835-v4l2\r\nv4l2-ctl -d /dev/video0 --list-formats-ext\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwatake2222%2Fdigitalcamera_raspberrypi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwatake2222%2Fdigitalcamera_raspberrypi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwatake2222%2Fdigitalcamera_raspberrypi/lists"}