Ich bin derzeit am basteln und benutze Raspberry PIs mit modifizierten Kameramodulen für Macroaufnahmen. Der Weg ist zwar noch lang, aber die ersten Bilder kann man sich bereits ansehen
![lächeln :)](./images/smilies/smile.gif)
AntSpy Youtube Channel
Viel Spaß!
#!/usr/bin/env python
import time
import RPi.GPIO as GPIO
# Use GPIO numbering
GPIO.setmode(GPIO.BCM)
# Set GPIO for camera LED
# Use 5 for Model A/B and 32 for Model B+
CAMLED = 5
# Set GPIO to output
GPIO.setup(CAMLED, GPIO.OUT, initial=False)
# On or off
# GPIO.output(CAMLED,True) # On
GPIO.output(CAMLED,False) # Off
#!/bin/bash
# @Author: Antspy
# @description
# This script helps recording timelapse videos from a raspberry pi
# camera module, either modified or with an macro lens attached.
# Most settings have been optimized to film badly lit ant nest
# interiour (sharpness, contrast). To prevent flickering, features
# like awb and drc are switched off.
#
# Required Arguments:
# $1 = Output base path (e.g. /home/pi/camera/)
# $2 = Length in minutes (e.g. 20)
# $3 = Colony designation (e.g. Lasius_1)
#
# Usage Example:
# ./antrec.sh /home/pi/camera 2 Lasius_1
#
# Check if we get the correct number of arguments
if [ $# -ne 3 ]
then
echo "Not enough arguments supplied, exiting..."
exit 1
fi
# Check pre-requisite: 'raspivid' installed
RVID=`which raspivid`
if command -v $RVID >/dev/null; then
echo; echo "$RVID found: Good!"
else
echo; echo "Cannot find $RVID or permission issue. Is the raspivid package installed?"; echo;
exit 1
fi
# Check pre-requisite: 'bc' installed
BC=`which bc`
if command -v $BC >/dev/null; then
echo; echo "$BC found: Good!"
else
echo; echo "Cannot find bc or permission issue. Is the bc package installed?"; echo;
exit 1
fi
# Change working directory to output path
cd $1
# Set recording flags.
DURATION=`echo $2*60000|bc`
FLAGS="-ISO 800 -awb off -awbg 0.75,2.5 -fps 2 -t $DURATION --sharpness 60 --contrast 10 --drc off"
CLEANFLAGS=`echo $FLAGS| sed 's/ //g'`
# Generate filenames and create target path
DATETIME=`date +%d-%m-%Y_%H.%M`
DATEDIR=`date +%d-%m-%Y`
mkdir -p $1/$DATEDIR
VIDOUT="$1/$DATEDIR/"$DATETIME"_$3_$CLEANFLAGS.h264"
# Debug output
#echo "Flags:" $FLAGS
#echo "Clean Flags:" $CLEANFLAGS
#echo "DateTime:" $DATETIME
#echo "DateDir:" $DATEDIR
#echo "Video output:" $VIDOUT
#echo "Rvid:" $RVID
#echo "Execute string:" $RVID $FLAGS -o $VIDOUT
# Do the actual recording
sudo $RVID $FLAGS -o $VIDOUT
EXIT_CODE=$?
exit $EXIT_CODE
Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste