-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking of the library with the DY-SV5W and DY-SV8F #1
Comments
Thanks for the extensive report, I will go through everything and reply point by point, perhaps in one stretch or maybe in several. First of all Query current pla drive seems to be missing indeed. Also based on this I found another bug in |
It was not my goal to make 100% coverage for all functionality, so this is indeed missing, I had no need for it. That said, I can add it: #3 |
I would be glad to test the new version of the library on DY-SV5W, DY-SV8F and DY-HV20T which I owe. Thank you for your efforts |
That would be very helpful, I'm going to probably order some of these boards soonish too so I can test better but don't have them yet. As you can see I didn't get through all of your feedback yet, but will get back to it. It's easier for me to test with ESP32 boards, since I have plenty and I find them convenient to use. Plus I want things independent from the Arduino framework. So I added support for that in a feature branch (WIP). Also.. Thank you for your efforts too! |
I respect your time, so I try to be precise. Please check if there is a problem to the follow Missing functions (maybe to add):
Maybe incorrect code (maybe to change):
I checked the release dyplayer-1.0.5 with the setting: Arduino UNO & DY-SV5W and DY-SV5F on UART mode. First I made the connections and I tried to upload the sketh to Arduino, but I was receiving error, as there was no connection between Arduino and PC. The problem solved when I disconnected the UART cables. The first two examples work well, while the last two not (PlaySoundByNumber and PlaySoundByPath) because of the loop. The DY-Player receives new order every 5sec and starts again. In the examples the Volume was set to 15, which coresponds to 21 out of 30. So it is not 50%, but 70%. Functions byPathCommand don't work at all. I think that it has to do with the char path[] The problematic in yellow at the last column |
The missing commands now have issues. The maybe incorrect commands I am going to check first, soon.
I added a note on this in the README because the manual says you should use 10K resistors..
Uno only has 1 UART, it's shared between the project and uploading sketches, so that's expected. Maybe I can add a line or two in the readme about that. Also I noticed I swapped CON1 and CON3 in the README by accident, but since you got sound I guess that didn't stop you from wiring it up.
Where did you find this information? I assumed it would be an integer between 1 and 30, I guess it is not one-on-one then?
I think I did see that working but the path is very specific, I'll test that again. I am not sure what is wrong with the interlude command, it is yellow in the first column, any reason? DYPlayer::setCycleTimes and DYPlayer::select are probably fixed, but untested. |
-In UART mode user's guide at page 2 says "All data is HEX in protocol, unless special introduction".
I organized better the 29 functions About the path maybe there is an other way Maybe instead to define the path, it would be easier to do the same with the "Combination play" where the user chooses the order of the sound files to play. Or maybe you could be inspired from the command list of the WT5001 -- |
Ah I see what you mean now, but I send a byte containing an integer of
Nice I think there should be an overview like that in the repo at some point. But also the API explained.
I am not sure what kind of problem you are trying to solve here. I have found some PDFs in a link on youtube that contain more info: https://yadi.sk/d/PA3xDmBEXSVtpA Read the
Note this is from the latest version on the master branch, not yet on platformio (if you use that). I added a namespace, you will need to adjust your sketches, basically add
Can't really add functionality to the module that isn't there eh.. :) Just give me the weekend to figure out some stuff and then you can test everything and tell me if anything is still broken. |
I checked how the several modes of play work with the hardware. Conclusions:
Have a nice weekend |
Sorry Chris, I am not programmer. I made it work in that way (except the combination play and the unknown commands) |
That's the default mode of the module. You can set it by calling
Yes, that's why the manual recommends you follow
It should work just with:
When a sound is playing, you can pause that sound and play a new sound until the second sound finshed or until you call
I will have a look at this soon, I didn't find the time yet.
This is what I wanted to suggest to you :)
Thanks! I have worked on the library in a feature branch last weekend but it's not in a state that it works, so I didn't push it to Github yet. I have added API documetation there, that might also help a bit with finding out what is what and how to use it. I also renamed some functions for consistency and some to better match the manual. Hopefully will push to Github before the end of the week. |
I checked the examples of the v.3 of the library with Arduino UNO and DY-SV5W. Play All Sounds: ok Play Sound By Path: I use the module with SD card, but arduino IDE returns 'FLASH' is not a member of 'DY', 'SD' is not a member of 'DY', 'USB' is not a member of 'DY', 'U' is not a member of 'DY'. So it is something with the declaration of the device. Combination play: didn't work |
They should be a member of
Most probably you need to figure out what the directory name should be on your board. On mine the files had to be in a directory called: |
Play Sound By Path worked with DY::Device::USB, but not with the DY::Device::SD About the combination play, all the music files were inside the DY folder. I checked with USB and SD without luck. Later I will check with other names too. For combination play in which drive the music can be?
*The user can put any order of the sounds to play. Thanks to Chris the problem of combination play was solved in a very simple way. I noticed that the extension of the files has to be always in capitals. Otherwise it doesn't work. If in the previous we ommit the name of the file, then it plays all the songs in the folder. Thanks Chris!!!Something unexpected happened. While I was using my regular USB flash disk, I heard sounds which I had in the disk and they didn't follow any rules for the names of folders or names of the files. The only I am sure, is that this sound was the oldest sound in that drive. So maybe the system recognizes the files according the age and not according the name...maybe! |
I just came back from a holiday, so didn't see this until now. Thanks for the update! Looks like I can do some improvements, e.g. make all small letters capitals automatically, then you can just write file names with
I'll add the
I ordered a board with an SD card slot a while back but it's stuck in China since a few weeks, probably due to the "issue" they are facing over there. Until I get it I'm afraid I can't test the combination play feature with
I think you are right, I had a similar problem with files in a hidden directory (trash folder), I heard sounds that I had removed already, which was kind of a suprise until I figured that out 😅 I guess that should be added to the manual too. Not sure when I'll get to it but I'll try to work on it this week. |
Master now converst lower case paths to upper case paths and several other changes, I still need to update the readme with our findings. Still no module to to test with. Can you maybe explain more about what you meant by:
I can make an example that uses a return but AFAIK, I can't tell you the file name of the playing sound, the module doesn't do that. I can get only the number. |
Hi, I am trying to play songs inside a folder like /A/00102.MP3. But that does not seem to work. Using a DY-SV5W and a 32gb card and using platformio |
@fritsjan do you have an example |
` // Initialise on software serial port. void setup() { //this //player.setCycleMode(DY::PlayMode::Repeat); // Play all and repeat. void loop() { //this plays a sound //this does not play, but file exists //this does not play, but file exists } |
I have found the bug! replace: sendCommand(_command, len + 4); it was using the len variable which gets updated when using paths to _len so therefore paths did not work. |
DYPlayer Issues.pdf
In the attachment I marked with yellow the problematic places.
The library is very interesting, but it needs some corections.
Query Command
Command: Query current play drive
Command code: AA 0A 00 B4
Setting Commands
Command: Specified song to be interplay
Command code: AA 16 03 Drive S.N.H S.N.L SM
Command: Combination play setting
Command code: AA 1B length SM
Command: End Combination play
Command code: AA 1C 00 C6
In the README.MD, in the table with the modules, the first "DY-HV20T" has to become "DY-SV5W"
I checked the examples of the library with the modules DY-SV5W and DY-SV8F. None of the examples didnt work with my modules.
My settings were:
Arduino UNO v.3
Mode: UART (0-0-1)
Power supply: 5V
RX and TX connections through 1K resistors with Arduino's TX and RX.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: