This shows you the differences between two versions of the page.
pm:prj2023:apredescu:mp3_player [2023/05/30 14:19] antonio.stan [Conclusions] |
pm:prj2023:apredescu:mp3_player [2023/05/30 15:30] (current) antonio.stan [Download] |
||
---|---|---|---|
Line 60: | Line 60: | ||
* If the next button is pressed, it plays the next track. | * If the next button is pressed, it plays the next track. | ||
* If the previous button is pressed, it plays the previous track. | * If the previous button is pressed, it plays the previous track. | ||
- | * Calls getSongDuration() to retrieve and display song duration information. | ||
* Playback functions: | * Playback functions: | ||
Line 72: | Line 71: | ||
* execute_CMD() function: | * execute_CMD() function: | ||
* Calculates the checksum and builds the command line to send to the MP3 module. | * Calculates the checksum and builds the command line to send to the MP3 module. | ||
- | |||
- | * getSongDuration() function: | ||
- | * Sends a command to the MP3 module to retrieve the current track's duration. | ||
- | * Reads the response from the MP3 module and extracts the duration and remaining duration information. | ||
- | * Updates the LCD display with the song duration and remaining duration. | ||
===== Results ===== | ===== Results ===== | ||
Line 90: | Line 84: | ||
* If you press the previous button (buttonPrevious) while playing a track, it will play the previous track. The LCD display will not update with the song duration or remaining duration. | * If you press the previous button (buttonPrevious) while playing a track, it will play the previous track. The LCD display will not update with the song duration or remaining duration. | ||
- | 3. Song Duration Display: | + | 3. Song Name Display: |
- | * The getSongDuration() function is called in the loop() function, but it is currently commented out (//getSongDuration();). Therefore, the song duration and remaining duration will not be displayed on the LCD screen. | + | * At the beginning, I declared two matrixes that contained the songs and the respective artists in order for them to be displayed on the LCD screen. |
===== Conclusions ===== | ===== Conclusions ===== | ||
- MP3 Module Integration: The project successfully integrates an MP3 module with an Arduino board using the SoftwareSerial library. The module is controlled using specific commands sent via the software serial communication. | - MP3 Module Integration: The project successfully integrates an MP3 module with an Arduino board using the SoftwareSerial library. The module is controlled using specific commands sent via the software serial communication. | ||
- | |||
- Playback Control: The code enables basic playback control functionalities such as play, pause, next track, and previous track. The buttons connected to the Arduino board trigger these playback commands. | - Playback Control: The code enables basic playback control functionalities such as play, pause, next track, and previous track. The buttons connected to the Arduino board trigger these playback commands. | ||
- | + | - LCD Display: The project utilizes a LiquidCrystal library to interface with an LCD display. The display is initialized and shows fixed text for "Artist" and "Song". | |
- | - LCD Display: The project utilizes a LiquidCrystal library to interface with an LCD display. The display is initialized and shows fixed text for "Duration:" and "Remaining:". However, the code for updating the duration and remaining duration on the LCD screen is incomplete or commented out. | + | |
- Volume Control: The code includes a function to set the volume of the MP3 module. By calling the setVolume() function with a specified volume level, the volume of the playback can be adjusted. | - Volume Control: The code includes a function to set the volume of the MP3 module. By calling the setVolume() function with a specified volume level, the volume of the playback can be adjusted. | ||
- | |||
- Serial Communication: The code establishes serial communication between the Arduino board and the MP3 module. It sends command sequences consisting of start bytes, command bytes, parameter bytes, and checksum bytes to control the module's behavior. | - Serial Communication: The code establishes serial communication between the Arduino board and the MP3 module. It sends command sequences consisting of start bytes, command bytes, parameter bytes, and checksum bytes to control the module's behavior. | ||
- | |||
- Button Integration: The project integrates buttons with the Arduino board to provide user input for controlling playback. The code reads the button states and performs the corresponding actions based on the button presses. | - Button Integration: The project integrates buttons with the Arduino board to provide user input for controlling playback. The code reads the button states and performs the corresponding actions based on the button presses. | ||
+ | - Additional Features: Depending on the specific requirements, additional features like playlist management, shuffle, repeat, or track selection can be implemented by extending the code and utilizing the capabilities of the MP3 module. | ||
===== Download ===== | ===== Download ===== | ||
- | <note warning> | + | {{:pm:prj2023:apredescu:stanantoniovalentin_1221a_mp3.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ă ;-). | + | |
- | 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**. | ||
- | </note> | ||
===== Jurnal ===== | ===== Jurnal ===== |