Bi-monthly release with minor bug fixes and improvements
# Set GPIO path
GPIO_PATH="/sys/class/gpio"
# Define Pins
SHUTTER=23
FOCUS=24
# This is backwards because of the board I'm using.
# You likely want to swap values here.
ON=0
OFF=1
# Function to export a pin if not already exported
exportPin() {
if [[ ! -e $GPIO_PATH/gpio$1 ]]
then
gpio export "$1" out
fi
}
# Function to change state of a pin
setState() {
echo $2 > $GPIO_PATH/gpio$1/value
}
# Function to expose for for a given number of seconds.
exposeSensor() {
setState $SHUTTER $ON
sleep $1
setState $SHUTTER $OFF
}
# Function to close the shutter.
closeShutter() {
setState $SHUTTER $OFF
}
# Export pins and set initial state.
exportPin $SHUTTER
setState $SHUTTER $OFF
exportPin $FOCUS
setState $FOCUS $OFF
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
indi_setprop -h 127.0.0.1 "EQMod Mount.SNAPPORT1.SNAPPORT1_ON=On"
indi_setprop -h 127.0.0.1 "EQMod Mount.SNAPPORT1.SNAPPORT1_OFF=On"
# Temporary aliases to work around localhost issue.
shopt -s expand_aliases
alias indi_getprop="indi_getprop -h 127.0.0.1"
alias indi_setprop="indi_setprop -h 127.0.0.1"
alias indi_eval="indi_eval -h 127.0.0.1"
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.