Difference between revisions of "Component: DFPlayer (MP3 / WAV) (Audio Output)"
From Flowcode Help
Jump to navigationJump to searchLine 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DFPlayer.fcfx FC_Comp_Source_DFPlayer.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DFPlayer.fcfx FC_Comp_Source_DFPlayer.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 68: | Line 68: | ||
No Examples here yet | No Examples here yet | ||
+ | |||
+ | |||
Latest revision as of 13:09, 7 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Audio Output |
Contents
DFPlayer (MP3 / WAV) component
A small module capable of streaming MP3 and WAV audio files from a micro SD card. Controlled via a serial UART connection to the microcontroller.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_DFPlayer.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_DFPlayer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No Examples here yet
Macro reference
GetError
GetReplyByte
![]() |
GetReplyByte |
Reads a single byte from the last reply. Each reply contains 4 bytes starting with the command code. | |
![]() |
Index |
Range: 0-3 / 0=Command, 1=Feedback, 2=Data MSB, 3=Data LSB | |
![]() |
Return |
Initialise
![]() |
Initialise |
Sets up the UART and does some housekeeping. Must be called before calling any of the other component macros. | |
![]() |
Return |
IsPlaying
![]() |
IsPlaying |
Checks to see if the last played track is still playing | |
![]() |
Return |
IsReplyAvailable
![]() |
IsReplyAvailable |
Checks to see if new data has been received from the module. Returns true when new data is available. Collect the data using the GetReplyByte macro. | |
![]() |
Return |
PausePlayResetStop
![]() |
PausePlayResetStop |
Allows the current playing track to be paused, restarted or reset | |
![]() |
Mode |
0=Pause, 1=Play, 2=Reset, 3=Stop | |
![]() |
Return |
PlayTrack
SendCommand
![]() |
SendCommand |
Sends a command to the DFPlayer module | |
![]() |
Command |
Command code byte | |
![]() |
Feedback |
Collect feedback byte: Range 0-1 | |
![]() |
Parameter |
16-bit Parameter | |
![]() |
Return |
SetEQ
![]() |
SetEQ |
Sets the equaliser mode for the module | |
![]() |
EQMode |
Range: 0-5 0=Normal, 1=Pop, 2=Rock, 3=Jazz, 4=Classic, 5=Bass | |
![]() |
Return |
SetVolume
![]() |
SetVolume |
Sets the volume level for the module | |
![]() |
Volume |
Range: 0 (min) - 30 (max) | |
![]() |
Return |
SkipTrack
![]() |
SkipTrack |
Jump to the next or previous track | |
![]() |
Direction |
0=Next, 1=Previous | |
![]() |
Return |
WhilePlaying