Projects/Create a nightlight from old usb charger

So everyone has a bunch of USB chargers lying around. This is a simple way to make a simple nightlight with only a few parts.

Components

 * USB charger
 * USB cable
 * white LED
 * resistor

Steps

 * Find a white LED, and note the forward voltage (VF) and max forward current (IF-max)
 * if you don't know the voltage and current, you can try VF=3.5V, and IF-max=20mA, and see if it's bright enough
 * Calculate needed resistor
 * R = (5-VF)/IF-max
 * select the closest available resistor
 * Cut and strip the usb cable
 * Solder the components together in the following order
 * USB's red wire -> resistor(R) -> LED(+) -> LED(-) -> USB's black wire
 * LED positive lead is the longer, negative lead is on the side of the LED with the sightly flat side on the bottom
 * You can just twist the wires and leads together, instead of soldering, just be sure they won't come apart, and insulate them well.
 * Insulate the wire and solder joints
 * Heat shrink tube works best
 * Electrical tape is OK, but can shift over time
 * You can let the led dangle from the charger, or put it in a clear/translucent cap or cover
 * remember LEDs are very unidirectional so point the LED towards the ground or the direction that works best for you.

Optional

 * you can add a darkness detector by adding a transistor(NPN BJT) and light-dependent resistor(LDR), but the LED/ON power usage is around 0.1W, so I didn't see the point.

Info

 * total power usage for my adapter was 0.4W