Raspberry Pi is so powerful, I start asking “can it control my camera”? I have been amazed by the fancy Time-Lapse photography, and wonder if Raspberry Pi can bring my experience to a new level. I have a Sony Mirrorless A6000, which comes with its own time-lapse app. But I don’t quite like it for various reason (it costs 10 bucks!). After an hour of searching, it seems possible!

First, very minimal hardwares requirement

  • A tripod:  definitely need it.
  • AC power adapter +  DC Coupler (link): you can use battery a shooting around 1-2 hours, but for longer you will need this.
  • A USB  to micro USB cable to connect Raspberry Pi to my Sony A6000

Now on the software part:

  1. it took me quite a while to find this excellent library gpohto2. Not only it can control my Sony A6000, it can also control more than 2000 cameras! Installation guide looks lengthy, but luckily some nice people has put everything together in a single file.  All you need to do is to copy and paste this following code, and select the stable version.
wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/gphoto2-updater.sh 
chmod +x gphoto2-updater.sh 
sudo ./gphoto2-updater.sh

Be patient. It takes like 15 minutes for me.

  1. Connect Sony A6000 to the Raspberry Pi and power on.
  2. Now check the connection by typing
gphoto2 --summary

You will see some text information about the camera. The camera is recognized.

  1. Type the following to get the configuration. Each camera can have different things you can configure, and they are listed differently, too.
gphoto2 --list-config

After that, you can type the following to check its current status of certain configuration. The XXX is the one you get from –list-config. For example, XXX is /main/capturesettings/shutterspeed for shutter speed. Most of them are self-explanatory.

gphoto2 --get-config XXX

You can also set the values by providing value.

gphoto2 --set-config XXX=value
  1. Take the photo! gphoto2 has a command capture-image-and-load. Just provide the filename, it will take the photo and save to Raspberry Pi.
gphoto2 --capture-image-and-download --filename FILENAME

With all these tools, we are able to control the camera now. It should be a matter simple coding to set up a time-lapse function, so that it will take a photo every few seconds. Just make sure you have enough storage space :) (My script is based on David, but I don’t have his fancy LCD.) Here is my first time-lapse work for sunset. There is some serious flickers that comes from discrete shutterspeed change. I believe there must be many ways to improve it. Now we have more to learn about time-lapse photography!

Updated: