Skip to content

asingleoat/focus-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Focus Rail

Web-controlled focus stacking for macro photography. Drives camera focus via libgphoto2, stepper motor via GPIO, serves a control UI over HTTP. Runs on Raspberry Pi Zero 2 W or desktop Linux.

Setup

Prerequisites

  • Nix with flakes enabled
  • direnv (optional, for automatic shell activation)

Clone and enter dev shell

git clone <repo-url> && cd focus-rail
direnv allow          # or: nix develop

Configure

cp .env.example .env  # edit with your Pi's SSH target

Pi setup (one-time)

./scripts/pi-setup.sh pi@raspberrypi.local
ssh pi@raspberrypi.local sudo reboot

Build and deploy

zig build -Dtarget=aarch64-linux-gnu -Doptimize=ReleaseSafe
./scripts/deploy.sh

Open http://<pi-ip>:8080 in a browser.

Focus stack workflow

# 1. Capture a stack via the web UI
# 2. Pull images to your desktop
./scripts/pull-stack.sh S001              # -> ./S001/

# 3. Process
./scripts/stack.sh S001/S001_manifest.json

Commands

Command Description
zig build Native debug build
zig build -Dtarget=aarch64-linux-gnu -Doptimize=ReleaseSafe Cross-compile for Pi
./scripts/deploy.sh Deploy binary + calibrations to Pi, restart server
./scripts/pi-setup.sh <host> One-time Pi configuration
./scripts/pull-stack.sh S001 [dest] Download stack from Pi (default: ./S001/)
./scripts/stack.sh <manifest>... Process a focus stack

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors