Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 2.43 KB

README_with_scAnt_setup.md

File metadata and controls

76 lines (46 loc) · 2.43 KB

PiscAnt (Pi scAnt)

Python code to run scAnt setup on Raspberry Pi Model 3+. This was developed for my own use, so code documentation here will appear over time.

Feel free to use this code and its Discussions and Issues pages.

CAD files to house the RPi HQ cam on the original or modified scAnt are available here.

A model of a praying mantis head generated from the photos taken with this code and setup is available here.

The scAnt author`s original code and documentation are available here, CAD files here, and the related publication here.

Installation

Raspbian

Install Raspbian GNU/Linux 11 (bullseye)

Enable legacy camera

sudo raspi-config

  • Interface Options
  • Legacy Camera: Enable
  • reboot

add imx477 support

sudo nano /boot/config.txt

add

# Enable pi HQ camera

dtoverlay=imx477

out-comment # dtoverlay=vc4-fkms-v3d

See below for some test commands to see if camera works.

download and install pololu tic 500 drivers

source: https://www.pololu.com/docs/0J71/all#1.2

cd ~/Downloads

tar -xvf pololu-tic-*.tar.xz

sudo pololu-tic-*/install.sh

(re-)plug tics

check if tics are detectable

ticcmd --list

when 3 tics are connected, it should look like this (with your own tic driver numbers):

0036xxx3, Tic T500 Stepper Motor Controller

0033xxx0, Tic T500 Stepper Motor Controller

0037xxx3, Tic T500 Stepper Motor Controller

start Tic Control Center

ticgui

install picamerax python package

pip install picamerax

some random camera control commands to test camera and find good settings

With help from https://www.arducam.com/docs/cameras-for-raspberry-pi/native-raspberry-pi-cameras/native-camera-commands-raspistillraspivid/

raspistill -t 1 -o image.jpg -p100,100,300,200

raspistill -t 1 -o image.jpg -n

raspistill -t 0 -k -o image.jpg -p 0,0,800,600

raspistill -t 0 -k -o image.jpg -p 30,30,800,600 --ISO 200 --shutter 3000 -sh 0 -co 0 -br 50 -sa 0

raspistill -t 0 -k -o image.jpg -p 30,30,800,600 --ISO 200 --shutter 3000 -sh 0 -co 0 -br 50 -sa 0 -awb off -awbg 2.9,1.5