This is an old revision of the document!
The Smart Lamp is an embedded system project that implements an adaptive LED lighting solution with two distinct operating modes, built around the ATmega328P Xplained Mini development board. In Manual Mode, the user controls the LED brightness directly via a potentiometer. The analog signal is read through ADC and converted to a PWM duty cycle that drives the LED. In Automatic Mode, a photoresistor senses the ambient light level, and the microcontroller automatically adjusts the LED brightness — brighter in dark environments, dimmer when the surroundings are already well-lit. At any moment, the current brightness level (0–100%) is displayed on a LCD connected via I2C. The user switches between modes by pressing the onboard button.
The motivation behind this project comes from two sources: the growing interest in smart home automation and energy-efficient lighting and the need for a compact and easy to use lamp for my desk. This auto-dimming lamp is a practical system that demonstrates core concepts for embedded projects.