This shows you the differences between two versions of the page.
pm:prj2025:avaduva:lucian.ilie2807 [2025/05/22 00:07] lucian.ilie2807 [Bibliografie/Resurse] |
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 | ||
+ | |||
+ | 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 | ||
+ | |||
+ | 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 349: | 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 ===== | ||
Line 373: | Line 379: | ||
__//**Hardware Resources**//__ | __//**Hardware Resources**//__ | ||
- | **Components:** | + | * **Components:** |
- | * https://www.robofun.ro/arduino-uno-r3 | + | * https://shorturl.at/wJVZz |
- | * https://www.robofun.ro/ldr-module | + | * https://shorturl.at/tPXaz |
- | * https://www.robofun.ro/oled-display-0.96-i2c | + | * https://shorturl.at/vd9zp |
- | * https://www.robofun.ro/piezo-buzzer | + | * https://shorturl.at/7pFHC |
- | * https://www.robofun.ro/led-rgb-cathode | + | * https://tinyurl.com/bdhm9uck |
- | * https://www.robofun.ro/led-5mm-rosu | + | * https://tinyurl.com/2b9mh7cf |
- | * https://www.robofun.ro/led-5mm-verde | + | * https://tinyurl.com/j2tesvn9 |
- | * https://www.robofun.ro/breadboard-830 | + | * https://tinyurl.com/47mrsvj7 |
- | * https://www.robofun.ro/jumper-wires-m-m | + | |
- | **Datasheets:** | + | * **Datasheets:** |
- | * https://datasheets.maximintegrated.com/en/ds/DS3231.pdf | + | * https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf |
- | * https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf | + | * https://datasheets.maximintegrated.com/en/ds/DS3231.pdf |
- | * https://cdn-shop.adafruit.com/datasheets/TSL2561.pdf | + | * https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf |
- | * https://docs.arduino.cc/hardware/uno-rev3 | + | * https://docs.arduino.cc/hardware/uno-rev3 |
- | **Software Resources:** | + | __//**Software Resources:**//__ |
* https://learn.adafruit.com/adafruit-oled-display-library | * https://learn.adafruit.com/adafruit-oled-display-library | ||
* https://learn.adafruit.com/adafruit-gfx-graphics-library | * https://learn.adafruit.com/adafruit-gfx-graphics-library |