mannbro / picodfplayer Goto Github PK
View Code? Open in Web Editor NEWMicroPython Driver for the DFPlayer (and clones) on Raspberry Pi Pico
License: MIT License
MicroPython Driver for the DFPlayer (and clones) on Raspberry Pi Pico
License: MIT License
I modified the playTrack function as follows and "Query Response: None" was printed in the console.
def playTrack(self, folder, file):
self.sendcmd(0x0F, folder, file)
sleep_ms(100) # Add a small delay to allow the DFPlayer time to process the play command
query_response = self.sendcmd(0x3A, 0x00, 0x00)
print("Query Response:", query_response)
Great MicroPython Module. Brilliant idea to end the example with a pause.
Recommendation: I added player.setVolume(10) early in the code
Bug report: player.playTrack(folder,file) does not work for me. CMD 0x0F says Specify folder for playback.
player.playMP3(file) works (almost) fine, but I do not find CMD 0x12 in the wiki.
Rmk ("almost"): I added track 0001 later than the rest, sequence is according to https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
NOTE: The order you copy the mp3 into micro SD card will affect the order mp3 played , which means play(1) function will play the first mp3 copied into micro SD card.
Can you explain "def sendcmd" for me, please ([email protected])
First of all, great module and explanation in your Video. I am a total novice, but I'm trying to build a Lightsaber hilt, and right now I'm working on the sound.
I got as far as getting the Player to play the appropriate sounds on Power On and Off, but between those sounds there is a small pause, which doesn't sound right.
Is there any way to let the player start the next sound while still playing the first one for a few ms? Or at least make the changing of the sound instantaneous?
Or better yet, would you happen to know how I could change the code to quickly reduce the volume of the first sound (incrementally, but fast) while getting the next file to start?
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.