Imagine a simple three component sensing device (an LED, a sensor and one additional sensor or input). Using a switch, the photoresistor will start to work then and sense whether or not the led night light is needed. With lower levels of light, the light turns on and when it gets bright the led dims as its no longer needed. When one is ready to go to bed they can use the switch to completely turn it off.
Something that could be interesting to add would be the possibility to set schedules for the night light that could then automatically turn off instead of having to manually hit a switch when you want to go to bed. I also think the LED could be more of a light strip that's more of an ambient light source, allowing more opportunity for colors and brightness.
One of the tricky aspects of this project was getting the reading of the photoresistor and figuring out how to publish that reading. This was important because then I could set up the values in the code so that they were accurate to the room I was in and the conditions that made the light turn on. At first the program wasn't working because I wasn't getting the lowest values I thought I would get when covering the photoresistor with my sleeve. The photoresistor was still getting values of light even when I thought I was completely covering it up.
You can upload files of up to 20MB using this form.