Difference between revisions of "Component: DFPlayer (MP3 / WAV) (Audio Output)"
From Flowcode Help
Jump to navigationJump to searchLine 16: | Line 16: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 26: | Line 28: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 72: | Line 76: | ||
| colspan="2" | Command code byte | | colspan="2" | Command code byte | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | Feedback | | width="90%" | Feedback | ||
|- | |- | ||
Line 95: | Line 99: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 162: | Line 166: | ||
| colspan="2" | Number of milliseconds to wait, 0=WaitForever | | colspan="2" | Number of milliseconds to wait, 0=WaitForever | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 175: | Line 179: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 206: | Line 210: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | Direction | | width="90%" | Direction | ||
|- | |- |
Revision as of 13:27, 17 November 2021
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.
Detailed description
No detailed description exists yet for this component
Examples
DALI Master Example, reads the value of a keypad and sends out DALI commands based on the key pressed, 1 = switch on a slave's light, 2 = switch off a slave's light, 3 = read the slave's light level.
DALI Master Example1
DALI Slave Example, listens for DALI messages and checks that the group is correct before attempting to process the request and if required reply to the master.
DALI Slave Example1
Downloadable macro reference
![]() |
PausePlayResetStop |
Allows the current playing track to be paused, restarted or reset | |
![]() |
Mode |
0=Pause, 1=Play, 2=Reset, 3=Stop | |
![]() |
Return |
![]() |
SendCommand |
Sends a command to the DFPlayer module | |
![]() |
Command |
Command code byte | |
![]() |
Feedback |
Collect feedback byte: Range 0-1 | |
![]() |
Parameter |
16-bit Parameter | |
![]() |
Return |
![]() |
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 |
![]() |
SetVolume |
Sets the volume level for the module | |
![]() |
Volume |
Range: 0 (min) - 30 (max) | |
![]() |
Return |
![]() |
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 |
![]() |
IsPlaying |
Checks to see if the last played track is still playing | |
![]() |
Return |
![]() |
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 |
![]() |
SkipTrack |
Jump to the next or previous track | |
![]() |
Direction |
0=Next, 1=Previous | |
![]() |
Return |
![]() |
Initialise |
Sets up the UART and does some housekeeping. Must be called before calling any of the other component macros. | |
![]() |
Return |