Git Product home page Git Product logo

astr0shoot's Introduction

astr0shoot

Script that capture photos from your camera (connected to Raspberry) and sending them to your PC on the fly

Setup

  1. Get a Raspberry Pi 3 or 4 (so they have WIFI module embedded) and install Raspbian or whatever you like.
  2. Connect it to the same WIFI network as your workstation PC. Make sure your router gives the same static IP always to Raspberry.
  3. Install "gphoto2" to Raspberry
  4. Install and start openssh server and turn off the firewall if there is anything blocking TCP 22
  5. Connect your DSLR (tested with my Canon 550D) with USB to the Raspberry Pi

Password-less SSH

From Windows 10 to RPi

Install whatever Linux WSL you like. The following example is with openSUSE Leap 15.1:

  • Fix the systemctl issue
sudo mv /usr/bin/systemctl /usr/bin/systemctl.old
sudo curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl
sudo chmod +x /usr/bin/systemctl
sudo systemctl start sshd
  • Make sure you have port 22 TCP open in your Windows box.
Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules

Over there, add a new rule for port 22.

Now

  • Create a key
$ ssh-keygen # press enter to all the questions
  • Copy the key to Raspberry
ssh-copy-id $rpi-user@rpi-ip
  • Now connect to your RPi without typing the password
ssh $rpi-user@rpi-ip

You must be connected to RPi by now.

  • Send the key from RPi to Windows Linux WSL
ssh-copy-id $rpi-user@rpi-ip
  • Connect back from RPi to Windows without typing the password
ssh $linux-wsl-username@windows-box-ip

Configure the script

Create a folder first to store the images in your WSL:

$ mkdir /mnt/c/astroimages

This folder should be accessible by C:\astroimages outside of the WSL.

Now open the script and modify at least these variables:

remoteUser="astroberry"                 # Username of the Raspberry Pi user
REMOTEPC="192.168.178.68"               # IP Address or Hostname of the Raspberry Pi
localDir="/mnt/c/astroimages"           # Local directory to save the photos

Run the script

./astr0shoot.sh $target $aperture $speed $iso $numberOfImages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.