Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2025:avaduva:lucian.ilie2807 [2025/05/21 23:06]
lucian.ilie2807 [General Description]
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>​
  
  
-===== Concluzii ===== 
  
-===== Download ​=====+===== Conclusions ​=====
  
-<note warning>​ +The development of this project provided valuable experience across both hardware and software domainsoffering a practical understanding of embedded systems and real-time interaction.
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului:​ sursescheme, 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. +**Skills and competencies acquired:**
-</​note>​+
  
 +  * **Embedded programming and software logic:​**  ​
 +    * Implemented real-time clock tracking, dynamic LED behavior, PWM dimming, and non-blocking execution using `millis()`  ​
 +    * Improved understanding of writing efficient, responsive code for microcontrollers
 +
 +  * **Sensor integration and environmental feedback:​**  ​
 +    * Used an LDR sensor to adjust LED brightness based on ambient light  ​
 +    * Gained insight into environmental sensing and intelligent system response
 +
 +  * **User interaction and input handling:​**  ​
 +    * Handled multiple button inputs (hour, minute, mode)  ​
 +    * Applied debounce and edge-detection techniques for stable input detection
 +
 +  * **Visual output and real-time status display:​**  ​
 +    * Utilized the OLED to show real-time time, light level, RGB mode, and dim status  ​
 +    * Strengthened knowledge of I²C communication and display control
 +
 +  * **Audio feedback and conditional logic:​**  ​
 +    * Implemented buzzer feedback that adapts to time of day (silent hours)  ​
 +    * Applied `tone()` and timers to manage auditory signals
 +
 +  * **Problem-solving and debugging:​**  ​
 +    * Overcame challenges in timer synchronization,​ display refresh, and RGB transitions  ​
 +    * Improved analytical thinking and troubleshooting in embedded contexts
 +
 +**Practical benefits and applications:​**
 +
 +  * **Time-aware visual indicators:​**  ​
 +    * Offers LED behavior that changes based on time, useful for ambient clocks or alerts
 +
 +  * **Custom interaction patterns:​**  ​
 +    * Button logic and color modes are adaptable to other user-controlled systems
 +
 +  * **Expandability and real-world relevance:​**  ​
 +    * Modular design supports easy addition of sensors and extensions  ​
 +    * Strong foundation for IoT, automation, or smart home projects
 +
 +In conclusion, this project served as a comprehensive introduction to embedded system design—combining real-time programming,​ sensor integration,​ display systems, and human interaction into a cohesive and practical implementation.
 +===== Download =====
 +
 +Link for the code: https://​github.com/​Ilie28/​Proiect-PM
  
 ===== Journal ===== ===== Journal =====
Line 326: Line 373:
 19.05.2025 – created and uploaded schematic + wiring diagram\\ ​ 19.05.2025 – created and uploaded schematic + wiring diagram\\ ​
 20.05.2025 – documented project structure and updated project page\\  ​ 20.05.2025 – documented project structure and updated project page\\  ​
 +22.05.2025 – finalized software logic and display integration;​ completed all wiki documentation\\  ​
  
-===== Bibliografie/Resurse ​=====+===== Bibliography/Resources ​===== 
 + 
 +__//​**Hardware Resources**//​__ 
 + 
 +  * **Components:​** 
 +    * https://​shorturl.at/​wJVZz  
 +    * https://​shorturl.at/​tPXaz 
 +    * https://​shorturl.at/​vd9zp ​  
 +    * https://​shorturl.at/​7pFHC ​  
 +    * https://​tinyurl.com/​bdhm9uck  
 +    * https://​tinyurl.com/​2b9mh7cf  
 +    * https://​tinyurl.com/​j2tesvn9 ​  
 +    * https://​tinyurl.com/​47mrsvj7  
 + 
 +  * **Datasheets:​** 
 +    * https://​ww1.microchip.com/​downloads/​en/​DeviceDoc/​Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf  
 +    * https://​datasheets.maximintegrated.com/​en/​ds/​DS3231.pdf ​  
 +    * https://​cdn-shop.adafruit.com/​datasheets/​SSD1306.pdf ​  
 +    * https://​docs.arduino.cc/​hardware/​uno-rev3 ​   
 + 
 +__//​**Software Resources:​**//​__ 
 +  * https://​learn.adafruit.com/​adafruit-oled-display-library ​  
 +  * https://​learn.adafruit.com/​adafruit-gfx-graphics-library ​  
 +  * https://​github.com/​adafruit/​RTClib ​  
 +  * https://​www.arduino.cc/​reference/​en/ ​  
 +  * https://​platformio.org/​lib/​show/​80/​Adafruit%20GFX%20Library ​  
 +  * https://​platformio.org/​lib/​show/​562/​Adafruit%20SSD1306  ​
  
-<​note>​ 
-Listă cu documente, datasheet-uri,​ resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware. 
-</​note>​ 
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
  
  
pm/prj2025/avaduva/lucian.ilie2807.1747857963.txt.gz · Last modified: 2025/05/21 23:06 by lucian.ilie2807
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0