Crash gave you excellent instructions for TIME EXPOSURE, but the Nikon D40 doesn't have time lapse capabilites. For that you'll need to move up to models like the D200 and D300.
You need to use a program to talk to your camera via the USB interface. This is called tethering (connecting a camera to a computer for remote control). Nikon Camera Control Pro has time lapse functionality. Expensive program for what it does. There are other cheaper programs out there which will do this function and there is a free program out there. You'll need to do a search to find those other programs. If you do time lapse for any length of time (perhaps, over 1 or 2 hours), you'll need to use an external power supply for the camera.
2) Use your (A)perture setting and set it to a smaller aperture letting the camera do the rest or use the (M)anual setting to adjust both aperture and shutter to your desire.
3) Use a remote to release the shutter if possible. Reduces your chance of shaking the camera.
Answers & Comments
Verified answer
Crash gave you excellent instructions for TIME EXPOSURE, but the Nikon D40 doesn't have time lapse capabilites. For that you'll need to move up to models like the D200 and D300.
You need to use a program to talk to your camera via the USB interface. This is called tethering (connecting a camera to a computer for remote control). Nikon Camera Control Pro has time lapse functionality. Expensive program for what it does. There are other cheaper programs out there which will do this function and there is a free program out there. You'll need to do a search to find those other programs. If you do time lapse for any length of time (perhaps, over 1 or 2 hours), you'll need to use an external power supply for the camera.
1) USE A TRIPOD!! :)
2) Use your (A)perture setting and set it to a smaller aperture letting the camera do the rest or use the (M)anual setting to adjust both aperture and shutter to your desire.
3) Use a remote to release the shutter if possible. Reduces your chance of shaking the camera.