module documentation

Async DFPlayer Mini Driver for MicroPython

This is a fully featured driver for the DFPlayer Mini MP3 player by DFRobot. It also supports other manufacturer's versions of the module.

Class DFPlayer Controller for the DFPlayer module.
Exception DFPlayerError Base Class of any module-specific Error.
Exception DFPlayerInitializationError Raised if DFPlayer instance is used uninitialized or when invalidly calling init or deinit.
Exception DFPlayerInternalError Raised when DFPlayer reports an error.
Exception DFPlayerTimeoutError Raised when DFPlayer communication times out.
Exception DFPlayerTransmissionError Raised when DFPlayer sends a malformed message.
Exception DFPlayerUnexpectedMessageError Raised when DFPlayer responds with a message not fitting a sent command or query.
Constant _ALL_QUERIES Undocumented
Constant _CMD_DAC Undocumented
Constant _CMD_EQ Undocumented
Constant _CMD_FILE_REPEAT_MODE Undocumented
Constant _CMD_NEXT Undocumented
Constant _CMD_PAUSE Undocumented
Constant _CMD_PLAY_ADVERT Undocumented
Constant _CMD_PLAY_ALL_RANDOM Undocumented
Constant _CMD_PLAY_ALL_REPEAT Undocumented
Constant _CMD_PLAY_FOLDER Undocumented
Constant _CMD_PLAY_FOLDER_REPEAT Undocumented
Constant _CMD_PLAY_FOLDER_XL Undocumented
Constant _CMD_PLAY_ID Undocumented
Constant _CMD_PLAY_ID_REPEAT Undocumented
Constant _CMD_PLAY_MP3 Undocumented
Constant _CMD_PREVIOUS Undocumented
Constant _CMD_RESET Undocumented
Constant _CMD_RESUME Undocumented
Constant _CMD_SOURCE Undocumented
Constant _CMD_STANDBY_OFF Undocumented
Constant _CMD_STANDBY_ON Undocumented
Constant _CMD_STOP Undocumented
Constant _CMD_STOP_ADVERT Undocumented
Constant _CMD_VOLUME Undocumented
Constant _CMD_VOLUME_DEC Undocumented
Constant _CMD_VOLUME_GAIN Undocumented
Constant _CMD_VOLUME_INC Undocumented
Constant _DEVICE_FLAG_FLASH Undocumented
Constant _DEVICE_FLAG_PC Undocumented
Constant _DEVICE_FLAG_SDCARD Undocumented
Constant _DEVICE_FLAG_TO_SOURCE Undocumented
Constant _DEVICE_FLAG_USB Undocumented
Constant _DEVICE_SOURCE_AUX Undocumented
Constant _DEVICE_SOURCE_FLASH Undocumented
Constant _DEVICE_SOURCE_SDCARD Undocumented
Constant _DEVICE_SOURCE_SLEEP Undocumented
Constant _DEVICE_SOURCE_USB Undocumented
Constant _END_BIT Undocumented
Constant _ERROR_CODE_TO_MESSAGE Undocumented
Constant _EVENT_DONE_FLASH Undocumented
Constant _EVENT_DONE_SDCARD Undocumented
Constant _EVENT_DONE_USB Undocumented
Constant _EVENT_EJECT Undocumented
Constant _EVENT_INSERT Undocumented
Constant _EVENT_READY Undocumented
Constant _EVENT_TO_DEVICE_FLAG Undocumented
Constant _INFO_ACK Undocumented
Constant _INFO_ERROR Undocumented
Constant _INIT_DEINIT Undocumented
Constant _INIT_FALSE Undocumented
Constant _INIT_TRUE Undocumented
Constant _LENGTH Undocumented
Constant _LOG_ALL Undocumented
Constant _LOG_DEBUG Undocumented
Constant _LOG_NONE Undocumented
Constant _QUERY_EQ Undocumented
Constant _QUERY_FILES_FLASH Undocumented
Constant _QUERY_FILES_FOLDER Undocumented
Constant _QUERY_FILES_SDCARD Undocumented
Constant _QUERY_FILES_USB Undocumented
Constant _QUERY_FOLDERS Undocumented
Constant _QUERY_MODE Undocumented
Constant _QUERY_STATUS Undocumented
Constant _QUERY_TRACK_FLASH Undocumented
Constant _QUERY_TRACK_SDCARD Undocumented
Constant _QUERY_TRACK_USB Undocumented
Constant _QUERY_VERSION Undocumented
Constant _QUERY_VOLUME Undocumented
Constant _START_BIT Undocumented
Constant _VERSION Undocumented
_CMD_DAC = (source)

Undocumented

Value
const(26)

Undocumented

Value
const(7)
_CMD_FILE_REPEAT_MODE = (source)

Undocumented

Value
const(25)
_CMD_NEXT = (source)

Undocumented

Value
const(1)
_CMD_PAUSE = (source)

Undocumented

Value
const(14)
_CMD_PLAY_ADVERT = (source)

Undocumented

Value
const(19)
_CMD_PLAY_ALL_RANDOM = (source)

Undocumented

Value
const(24)
_CMD_PLAY_ALL_REPEAT = (source)

Undocumented

Value
const(17)
_CMD_PLAY_FOLDER = (source)

Undocumented

Value
const(15)
_CMD_PLAY_FOLDER_REPEAT = (source)

Undocumented

Value
const(23)
_CMD_PLAY_FOLDER_XL = (source)

Undocumented

Value
const(20)
_CMD_PLAY_ID = (source)

Undocumented

Value
const(3)
_CMD_PLAY_ID_REPEAT = (source)

Undocumented

Value
const(8)
_CMD_PLAY_MP3 = (source)

Undocumented

Value
const(18)
_CMD_PREVIOUS = (source)

Undocumented

Value
const(2)
_CMD_RESET = (source)

Undocumented

Value
const(12)
_CMD_RESUME = (source)

Undocumented

Value
const(13)
_CMD_SOURCE = (source)

Undocumented

Value
const(9)
_CMD_STANDBY_OFF = (source)

Undocumented

Value
const(11)
_CMD_STANDBY_ON = (source)

Undocumented

Value
const(10)
_CMD_STOP = (source)

Undocumented

Value
const(22)
_CMD_STOP_ADVERT = (source)

Undocumented

Value
const(21)
_CMD_VOLUME = (source)

Undocumented

Value
const(6)
_CMD_VOLUME_DEC = (source)

Undocumented

Value
const(5)
_CMD_VOLUME_GAIN = (source)

Undocumented

Value
const(16)
_CMD_VOLUME_INC = (source)

Undocumented

Value
const(4)
_DEVICE_FLAG_FLASH = (source)

Undocumented

Value
const(8)
_DEVICE_FLAG_PC = (source)

Undocumented

Value
const(4)
_DEVICE_FLAG_SDCARD = (source)

Undocumented

Value
const(2)
_DEVICE_FLAG_USB = (source)

Undocumented

Value
const(1)
_DEVICE_SOURCE_AUX = (source)

Undocumented

Value
const(3)
_DEVICE_SOURCE_FLASH = (source)

Undocumented

Value
const(5)
_DEVICE_SOURCE_SDCARD = (source)

Undocumented

Value
const(2)
_DEVICE_SOURCE_SLEEP = (source)

Undocumented

Value
const(4)
_DEVICE_SOURCE_USB = (source)

Undocumented

Value
const(1)
_END_BIT = (source)

Undocumented

Value
const(239)
_ERROR_CODE_TO_MESSAGE: dict[int, str] = (source)

Undocumented

Value
{1: 'Module is busy',
 2: 'Device is in standby mode',
 3: 'Received corrupt frame',
 4: 'Invalid checksum',
 5: 'File index out of bounds',
 6: 'File not found',
 7: 'Can only advertise while a track is playing'}
_EVENT_DONE_FLASH = (source)

Undocumented

Value
const(62)
_EVENT_DONE_SDCARD = (source)

Undocumented

Value
const(61)
_EVENT_DONE_USB = (source)

Undocumented

Value
const(60)
_EVENT_EJECT = (source)

Undocumented

Value
const(59)
_EVENT_INSERT = (source)

Undocumented

Value
const(58)
_EVENT_READY = (source)

Undocumented

Value
const(63)
_INFO_ACK = (source)

Undocumented

Value
const(65)
_INFO_ERROR = (source)

Undocumented

Value
const(64)
_INIT_DEINIT = (source)

Undocumented

Value
const(2)
_INIT_FALSE = (source)

Undocumented

Value
const(0)
_INIT_TRUE = (source)

Undocumented

Value
const(1)

Undocumented

Value
const(6)
_LOG_ALL = (source)

Undocumented

Value
const(2)
_LOG_DEBUG = (source)

Undocumented

Value
const(1)
_LOG_NONE = (source)

Undocumented

Value
const(0)
_QUERY_EQ = (source)

Undocumented

Value
const(68)
_QUERY_FILES_FLASH = (source)

Undocumented

Value
const(73)
_QUERY_FILES_FOLDER = (source)

Undocumented

Value
const(78)
_QUERY_FILES_SDCARD = (source)

Undocumented

Value
const(72)
_QUERY_FILES_USB = (source)

Undocumented

Value
const(71)
_QUERY_FOLDERS = (source)

Undocumented

Value
const(79)
_QUERY_MODE = (source)

Undocumented

Value
const(69)
_QUERY_STATUS = (source)

Undocumented

Value
const(66)
_QUERY_TRACK_FLASH = (source)

Undocumented

Value
const(77)
_QUERY_TRACK_SDCARD = (source)

Undocumented

Value
const(76)
_QUERY_TRACK_USB = (source)

Undocumented

Value
const(75)
_QUERY_VERSION = (source)

Undocumented

Value
const(70)
_QUERY_VOLUME = (source)

Undocumented

Value
const(67)
_START_BIT = (source)

Undocumented

Value
const(126)
_VERSION = (source)

Undocumented

Value
const(255)