The Nikon D40’s built-in flash works well in most situations, but what about when you want better lighting for more nuanced pictures? With the Nikon Creative Lighting System, you can add an external flash to the D40 body. By using an external flash on the D40, you can combine its advantages, such as the ability to make minute adjustments to flash output and to aim or extend the flash head for more even lighting coverage, with the features of the Nikon Creative Lighting System.
Check the batteries on both the D40 and the external flash. Using an external flash takes more power than using the on-camera flash. In order for the D40's metering system to function properly with an external flash, both the camera and the flash must have a good charge. Replace the batteries if necessary.
Locate the hot shoe mount lock on the flash unit and set it to the open position. Align the flash mount to the hot shoe mount on the camera, then slide the flash's hot shoe mount gently forward to attach the flash.