Is it possible to get the code (in any programming language) to give control over the features of a DSLR e.g shutter speed and exposure?

Canon and Nikon cameras come with a pre-included software that can allow to control the camera from the computer but I want the specific commands that I can send to the camera for it to vary its function and take pictures and send back to the computer.

I'm particularly interested in the Nikon D300, Sony Alpha 700, Olympus E300, Canon EOS 20D, 70D and Pentax K10D.

  • 2
    \$\begingroup\$ By "manually", do you mean "not manually at all, but by software"? \$\endgroup\$
    – mattdm
    Commented Aug 8, 2013 at 13:28
  • 1
    \$\begingroup\$ I think you really mean programmatically by an external computer using software you write. What requirements do you have that are not met by things like Canon's free DPP? Check out David Hunt's Raspberry PI in a battery holder for his Canon DSLR: davidhunt.ie/?p=2641 \$\endgroup\$ Commented Aug 8, 2013 at 13:45

3 Answers 3


Canon also provide SDK. Only the following cameras are supported in 2.13 (July 11, 2013):

  • EOS-1D C / EOS 6D / EOS M
  • EOS-1D X / 1D Mark III / 1Ds Mark III / 1D Mark IV
  • EOS 40D / 50D / 5D Mark II / 5D Mark III / 7D / 60D / 60Da
  • EOS Rebel XSi / 450D
  • EOS Rebel XS / 1000D
  • EOS Rebel T1i / 500D
  • EOS Rebel T2i / 550D
  • EOS Rebel T3i / 600D
  • EOS Rebel T4i / 650D
  • EOS Rebel T3 / 1100D
  • EOS Rebel T5i / 700D, EOS Rebel SL1 / 100D (Newly supported models)

Current (April 24, 2018) model compatibility charts you can find here.


I am aware of two potential solutions (there are certainly more):

  1. Nikon provides a free of charge SDK for tethering. I have never played with this, so I am not sure what it's capable of, but I imagine it should satisfy your needs to some extent. Download it here.

  2. The DIYPhotobits.com Camera Control software allows for setting aperture and shutter speed. If I'm not mistaken, it's based on Windows Image Acquisition, which you can use in your own (Windows) programs.


You can try CHDK (Canon Hack Development Kit). Simple DIY remote allows you to control your camera remotely.

It also allow you use uBASIC and Lua scripts to control camera without PC. Simply put script on storage card and run it from camera menu.

  • 2
    \$\begingroup\$ The CHDK works only with Canon's P&S cameras, not with any of their SLRs. \$\endgroup\$
    – Philip Kendall
    Commented Aug 15, 2013 at 13:01
  • \$\begingroup\$ I thought it worked with som old dslrs, dont have time to check now but around the age of the 20d \$\endgroup\$
    – lijat
    Commented Apr 26, 2018 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.