Demonstration of USB control of a Nikon D40 using gPhoto2 software in Linux (specifically Easy Peasy, the Ubuntu derivation for Asus Eee PC computers).
GPHOTO2 COMMAND PRIMER
The D40 can store photos in one of two places: the camera's internal memory or the SD memory card. You can select which one using:
gphoto2 --set-config capturetarget=0 # capture to internal memory
gphoto2 --set-config capturetarget=1 # capture to SD memory card
CAPTURING TO INTERNAL MEMORY
If you want to capture to internal memory you have to retrieve the photo before taking the next picture, so the sequence might be:
gphoto2 --set-config capturetarget=0 # run this once
gphoto2 --capture-image --get-file 2 # snap photo and download file
The value "2" is a 1-based index to the file you want. You can list the files by index like this:
gphoto2 --capture-image --list-files
If you omit --capture-image you will only see one file (index #1), called "/special/curve.ntc". If you include --capture-image the second file (index #2) will be "/store_00010001/capt0000.jpg", the newly-taken photo.
You can also capture multiple files, and then download them, like this:
gphoto2 --interval=2 --frames=4 --capture-image --filename=photo%Y%M%S.jpg --get-all-files
I haven't figured out how to get the camera shooting in quick mode (2.5 shots per second), though.
CAPTURING TO SD MEMORY CARD
In this case, you can capture as many photos as will fit in the memory card and then download them later by any means (including using a card reader or the --list-files, --get-files, and --get-all-files options):
gphoto2 --set-config capturetarget=1 # run this once
gphoto2 --capture-image # run this as many times as you like
You can also do time-lapse:
gphoto2 --interval=2 --frames=4 --capture-image
The photos will be stored in the memory card, exactly the same as if you had taken them manually.
i have that same netbook, i have never been able to set it up to my wireless connections, always says 'pending' any tips to get it to work?
ClatteredTorso 2 months ago
@ClatteredTorso I never had any problems with Wifi, either with the standard Xandros or with Ubuntu.
(Now I use Lubuntu on the EeePC 4G, and instead of gPhoto2 I use a custom Python module written following the specs published by Nikon which allows much better control of the camera.)
arturormk 1 month ago in playlist Uploaded videos
The camera lcd lighting up after each shot will drain the battery rather quickly. Camera Control Pro or ControlMyNikon I think will not light up the LCD.
nikstacker 1 year ago
@nikstacker I know this is 1 year old, but YouTube would never let me post replies and now I just realized that the new YouTube interface does let me :)
My trick to keep the screen off when under computer control is to plug a dummy jack into the video output. I now use the Nikon protocol directly to control the camera (from Python), but there is no function to keep the screen off in that protocol.
arturormk 1 month ago in playlist Uploaded videos
The image display in this video is just Nautilus. You could make the pictures larger with Control+mouse wheel and then select reverse sort by date in the View menu so the latest image is always first.
arturormk 2 years ago