Differences

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

Link to this comparison view

pm:prj2023:tmiu:soundactivatedlights [2023/05/27 13:01]
denisa.stanescu
pm:prj2023:tmiu:soundactivatedlights [2023/05/30 12:28] (current)
denisa.stanescu
Line 46: Line 46:
  
   * ADC (lab4)   * ADC (lab4)
-- sensorValue = (float)analogRead(sensorPin) * (5.0 / 1024.0); ​+-sensorValue = (float)analogRead(sensorPin) * (5.0 / 1024.0); ​
  
-- performs an analog-to-digital conversion using the analogRead function; it reads the analog value from sensorPin and converts it to a digital value+-performs an analog-to-digital conversion using the analogRead function; it reads the analog value from sensorPin and converts it to a digital value
   * Timer (lab3)   * Timer (lab3)
-- Timer1.initialize(100000);  ​+-Timer1.initialize(100000);  ​
  
-- sets the timer interval to 100ms (0.1s); this allows for periodic execution of a function based on the timer interval+-sets the timer interval to 100ms (0.1s); this allows for periodic execution of a function based on the timer interval
   * Interrupt (lab2)   * Interrupt (lab2)
-- Timer1.attachInterrupt(FlashLEDs); ​+-Timer1.attachInterrupt(FlashLEDs); ​
  
-- attaches the FlashLEDs function to the interrupt triggered by Timer1; this means that every time the timer interrupt occurs (every 100ms), the FlashLEDs function will be executed.+-attaches the FlashLEDs function to the interrupt triggered by Timer1; this means that every time the timer interrupt occurs (every 100ms), the FlashLEDs function will be executed.
   * libraries and 3rd party sources:   * libraries and 3rd party sources:
-- <​avr/​interrupt.h>​+-<​avr/​interrupt.h>​
  
-- TimerOne.h (It is used in this code to set up a timer interrupt for flashing the LEDs)+-TimerOne.h (It is used in this code to set up a timer interrupt for flashing the LEDs)
   * algorithms and structures:   * algorithms and structures:
-- MainFunction():​ Reads the sensor value, filters the signal, and compares it to predefined values to determine the color to display on the RGB LED strip+-MainFunction():​ Reads the sensor value, filters the signal, and compares it to predefined values to determine the color to display on the RGB LED strip
  
-- FilterSignal(float sensorSignal):​ Applies a filter to the sensor signal using a weighted moving average algorithm+-FilterSignal(float sensorSignal):​ Applies a filter to the sensor signal using a weighted moving average algorithm
  
-- CompareSignalFiltered(float filteredSignal):​ Compares the filtered signal to predefined thresholds to determine the appropriate color to display+-CompareSignalFiltered(float filteredSignal):​ Compares the filtered signal to predefined thresholds to determine the appropriate color to display
  
-- RGBColor(int Rcolor, int Gcolor, int Bcolor): Sets the color of the RGB LED strip by writing appropriate values to the Rpin, Gpin, and Bpin pins+-RGBColor(int Rcolor, int Gcolor, int Bcolor): Sets the color of the RGB LED strip by writing appropriate values to the Rpin, Gpin, and Bpin pins
  
   * functions:   * functions:
-- setup(): Sets up the initial configuration of the program, including serial communication initialization and timer setup+-setup(): Sets up the initial configuration of the program, including serial communication initialization and timer setup
  
-- loop(): Contains the main execution loop, calling the MainFunction() repeatedly+-loop(): Contains the main execution loop, calling the MainFunction() repeatedly
  
-- FlashLEDs():​ A timer interrupt service routine (ISR) that alternates the LED strip between white and off states+-FlashLEDs():​ A timer interrupt service routine (ISR) that alternates the LED strip between white and off states
  
  
 +  *
  
 <file c++> <file c++>
- 
  
 #include <​avr/​interrupt.h>​ #include <​avr/​interrupt.h>​
Line 174: Line 174:
   }   }
 } }
 +
 </​file>​ </​file>​
- 
  
  
Line 201: Line 201:
 ===== Download ===== ===== Download =====
  
 +{{:​pm:​prj2023:​tmiu:​proj_details.zip|}}
  
-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ă ;-).+===== Jurnal =====
  
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:​pm:​prj20??:​c?​** sau **:​pm:​prj20??:​c?:​nume_student** (dacă este cazul). **Exemplu:​** Dumitru Alin, 331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. 
  
 +Finished initial doc. (7/5/2023)
  
-===== Jurnal =====+Added hardware scheme. (28/​5/​2023) 
 + 
 +Added software program.(28/​05/​2023)
  
  
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. 
  
 +===== Bibliography =====
  
-===== Bibliografie/​Resurse ===== 
  
  
-Listă cu documente, datasheet-uri,​ resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**.+[[https://​www.geeksforgeeks.org/​introduction-of-led/​]]
  
 +[[https://​randomnerdtutorials.com/​guide-for-ws2812b-addressable-rgb-led-strip-with-arduino/​]]
  
 <​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/prj2023/tmiu/soundactivatedlights.1685181676.txt.gz · Last modified: 2023/05/27 13:01 by denisa.stanescu
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