This shows you the differences between two versions of the page.
pm:prj2025:avaduva:lucian.ilie2807 [2025/05/26 13:36] lucian.ilie2807 [Rezultate Obţinute] |
pm:prj2025:avaduva:lucian.ilie2807 [2025/05/27 12:10] (current) lucian.ilie2807 [Download] |
||
---|---|---|---|
Line 161: | Line 161: | ||
* Before 19:00: Red LED blinks at 1 Hz; Green LED flashes on minute change | * Before 19:00: Red LED blinks at 1 Hz; Green LED flashes on minute change | ||
* After 19:00: Red/Green LEDs act as clock hands (PWM based on hour/minute) | * After 19:00: Red/Green LEDs act as clock hands (PWM based on hour/minute) | ||
- | * RGB LED cycles through 7 preset colours using PWM; dims automatically at night | + | * RGB LED cycles through 7 preset colours using PWM; its brightness adjusts dynamically based on ambient light level measured by the LDR (auto-dim at night) |
* Buzzer generates: | * Buzzer generates: | ||
* Short beep on button press (except 19–23 when silent) | * Short beep on button press (except 19–23 when silent) | ||
Line 250: | Line 251: | ||
* Conditional muting logic: buzzer is disabled between 19:00–23:59 to avoid disturbance | * Conditional muting logic: buzzer is disabled between 19:00–23:59 to avoid disturbance | ||
- | **Lab 6 – debouncing, edge detection, and button logic** | + | **Lab 6 – I²C bus, debouncing, edge detection, and button logic** |
- | * All buttons are configured with `INPUT_PULLUP` | + | * Communication with both **RTC DS3231** and **OLED SSD1306** via the **I²C bus** (`Wire.h`) |
- | * Falling-edge detection using previous state comparison | + | * All buttons are configured with `INPUT_PULLUP` |
+ | * Falling-edge detection using previous state comparison | ||
* Three buttons implemented with distinct actions (hour, minute, mode switching) | * Three buttons implemented with distinct actions (hour, minute, mode switching) | ||
* Every interaction triggers a visual and/or auditory feedback | * Every interaction triggers a visual and/or auditory feedback | ||
Line 299: | Line 301: | ||
===== Rezultate Obţinute ===== | ===== Rezultate Obţinute ===== | ||
- | <note tip> | + | The results after completing all the project: |
- | Care au fost rezultatele obţinute în urma realizării proiectului vostru. | + | |
https://streamable.com/nzzcwh | https://streamable.com/nzzcwh | ||
+ | |||
+ | This video presents the base functionalities of the smart clock: * The **OLED screen** displays real-time data: current time, ambient light level (lux), and the active RGB color index. * The **RGB LED** changes color with each short press of **BTN MODE**, cycling through 7 predefined colors. * Holding **BTN MODE** triggers a visual feedback mode where the RGB LED blinks white at 4 Hz. * The **Dim mode** (based on LDR readings) reduces LED brightness in low light conditions. * The **hour** and **minute buttons** allow manual time adjustments. | ||
https://streamable.com/ryv6rw | https://streamable.com/ryv6rw | ||
+ | |||
+ | This clip shows the additional functionality activated after 19:00: * The **red LED** (D5) no longer blinks but gradually brightens depending on the current **hour**. * The **green LED** (D6) lights up with intensity proportional to the current **minute**. This simulates a simple hour-and-minute hand system using LED brightness. After 00:00, both LEDs return to their standard behavior (blinking and minute-flash). Additionally, the **RGB LED** adapts to ambient light using the **LDR sensor**. When you shine light onto the photoresistor, the RGB LED's brightness increases accordingly. | ||
+ | In darker environments, the RGB LED automatically dims (enters **dim mode**) for smoother visual integration during nighttime. | ||
</note> | </note> | ||
+ | |||
Line 353: | Line 360: | ||
===== Download ===== | ===== Download ===== | ||
- | <note warning> | + | Link for the code: https://github.com/Ilie28/Proiect-PM |
- | O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). | + | |
- | + | ||
- | Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul in care se incarca fisierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin. | + | |
- | </note> | + | |
===== Journal ===== | ===== Journal ===== |