Skip to content

Instantly share code, notes, and snippets.

@geerlingguy
Last active December 9, 2023 17:23
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geerlingguy/de62619a906803808edddaf8bb9cdce8 to your computer and use it in GitHub Desktop.
Save geerlingguy/de62619a906803808edddaf8bb9cdce8 to your computer and use it in GitHub Desktop.
ArduCam Hawk-Eye 64MP camera setup
# Download the pivariety driver install script and make it executable
wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
# Install libcamera dev and apps
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
# Install the Hawk-Eye kernel driver
./install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver
# Edit /boot/config.txt, and under [pi4] section, add this line:
dtoverlay=vc4-kms-v3d,cma-512
# After a reboot, take a picture with autofocus at 16 megapixels:
libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 --width 4624 --height 3472 -o 16mp-autofocus-test.jpg --autofocus
# Or at 64 megapixels (default resolution):
libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 -o 64mp-autofocus-test.jpg --autofocus
# Or just watch a preview with autofocus working:
libcamera-still -t 0 --viewfinder-width 2312 --viewfinder-height 1736 --autofocus
# Or play around with digital zoom:
libcamera-still -t 0 --viewfinder-width 2312 --viewfinder-height 1736 -k
# While preview is showing, go back to terminal and press:
# W: Zoom in
# S: Zoom out
# I: Move upward
# K: Move downward
# J: Move left
# L: Move right
# R: Reset
# M: 10x Zoom
# You have to press the character, then press 'Enter' for it to register.
# To use continuous autofocus:
libcamera-still -t 0 --viewfinder-width 2312 --viewfinder-height 1736 --continue-autofocus
# Note: This mode seems to have some quirks right now, in terms of when it re-focuses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment