![]() ![]() Great for speaker and amplifier projects DIY.ġ x UART Serial MP3 Music Player Module With Speaker On-board headphone jack, it can connect headphones or external amplifier.Ĭan be directly plugged onto the Serial MP3 Player module to use. UART TTL serial control playback mode, baud rate is 9600bps On-board speaker interface XH2.54-2P, can connect to external speakers such as 8 ohm 3-watt, 8 ohm 2 watt, 8 ohm 1 watt It is compatible with Arduino/AVR/ARM/PIC. You can also debug the module via USB to UART module. UART port, such as switch songs, change the volume and play mode and so on. MCU can control the MP3 playback state by sending commands to the module via There is a TF card socket on board, so you can plug the micro SD card that stores audio files. It can support 8k Hz ~ 48k Hz sampling frequency MP3 and WAV file formats. Headphones with a 3.5mm jack termination or an active speaker. An Arduino Uno, RedBoard, Arduino Pro or any other Arduino-compatible board. SD Card and a computer with a means to get music files onto it. The module is a kind of simple MP3 player device which is based on a high-quality MP3 audio chip. Requirements To follow along with this tutorial you'll need the following items: An MP3 Player Shield, of course. The online docs I can find aren't technical. Like most Arduino parts it arrived alone in an envelope. I have hacked this example to the point where the extra FF's are eliminated, but still no joy in Mudville.ĭoesn't say SQUAT. This is why I was asking if anyone had PERSONAL EXPERIENCE to share. Where is the directory specified? How is song 001 specifed with only 01? Or is the 01 the directory and it just defaults to the first song? Lots of vagueness.įor(int i=0 i MP3 Command => 7E3351FFFFFFEFġ5:01:34.530 -> MP3 Command => 7E44102FFFFFFEFġ5:01:35.562 -> MP3 Command => 7E44102FFFFFFEF thats the diag that didn't work as advertised: like this command: 7E 04 41 00 01 EF (Play with index: /01/001xxx.mp3) Serial.println(" aumenta ou diminui o volume") Serial.println(" seleciona equalizacao") Serial.println(" pausa/continua a musica") Serial.println("] Para selecionar o arquivo MP3") So each time, the scheme will be printing the Options Menu you have, with commands, directions. You control this entire assembly through the serial monitor. Serial.print("Numero de arquivos no cartao SD: ") MaxSongs = myDFPlayer.readFileCounts(DFPLAYER_DEVICE_SD) recupera o numero de Músicas encontradas no SD. MyDFPlayer.volume(10) //Volume 10 vai de 0 a 30 Serial.println("Modulo DFPlayer Mini inicializado!") Serial.println("1.Cheque as conexoes do DFPlayer Mini") Serial.println("Inicializando modulo DFPlayer. Serial.begin(115200) //Verifica se o modulo esta respondendo e se o In this step, we put options of prints to give you indications that it is mounting the circuit, with evaluations of false conditions, for example. ![]() variável responsável por armazenar o total de músicas presentes no SD card. Int equalizacao = 0 // (0 = Normal, 1 = Pop, 2 = Rock, 3 = Jazz, 4 = Classic, 5 = Bass)" variável responsável por armazenar o estado da equalização variável responsável por armazenar o estado do player (0: tocando 1: pausado) variável responsável por armazenar os comandos enviados para controlar o player Objeto responsável pela comunicação com o módulo MP3 (DFPlayer Mini) SoftwareSerial mySoftwareSerial(10, 11) // RX, TX Inicia a serial por software nos pinos 10 e 11 Today, we will build an mp3 player using an Arduino and the DFPlayer mini MP3 module. #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" The "pause" variable will be used to indicate if the music is playing or paused (pause = true, and indicates that it is paused, otherwise it is playing). The buf variable, which is of type String, will serve to store the data coming from the Arduino Serial, which will be the commands for the MP3 module. Start by creating one object, the serial software, and another, which is myDFPlayer. We'll start by defining the libraries and constants we'll use with our code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |