This project is for surprise boxes, have it as a surprise this if it detects light the happy birthday song will sound the lights will turn on and the lcd will say: happy birthday
Este proyecto es para cajas de sorpresa, tenerlo de sorpresa esto si detecta luz sonara la canción de feliz cumpleaños prenderan las luces y el lcd dirá: happy birthday

Interaction and Design
The core concept of this project is a Hidden Surprise Box. The system remains dormant while inside a dark, closed box. Using a Photoresistor (LDR), the Arduino monitors the light level. As soon as the box is opened and light enters, the LDR's resistance changes, triggering the "Happy Birthday" sequence including music, lights, and a digital greeting.
Components in Detail
- Light Detection: An LDR is used in a voltage divider circuit with a 10k ohm resistor. This allows the Arduino to read analog values on pin A0.
- Audio Output: A passive Buzzer is connected to digital pin 7. The Arduino uses frequency-based tone generation to play the recognizable birthday melody.
- Visual Effects: Multiple LEDs (Red, Blue, and Green) are distributed across the breadboard. They are programmed to blink in rhythm with the music.
- Display: An I2C 16x2 LCD module shows the "Happy Birthday" message, simplifying the wiring to just SDA and SCL pins.
Assembly Guide
1. Audio and Light Sensor
Connect the buzzer to pin 7 and Ground. Wire the LDR to 5V and then through a 10k resistor to Ground. Connect the junction between the LDR and resistor to Analog Pin A0.
2. Visual Assembly
Connect the LEDs to digital pins (excluding pins 5 and 7 which are reserved for other functions). Each LED must have a current-limiting resistor (approx. 221 ohm) to prevent damage.
3. Display Connection
Mount the I2C LCD by connecting its VCC to 5V, GND to GND, SDA to SDA, and SCL to SCL. Ensure the I2C address is correctly specified in the code (common addresses are 0x27 or 0x3F).
Surprise Implementation
Place the entire breadboard and Arduino into a gift box. When the recipient opens the lid, the ambient light will decrease the LDR's resistance, crossing a predefined threshold in the code and starting the celebration!