Approved content

The content below is provided by a partner.

51bit/dfplayermini 0.1.6 GitHub

DFPlayer Mini driver

makecode pxt extension for Xuefeng DFPlayer Mini Audio Board

DFPlayer Mini Module:

Alt text

Xuefeng DFPlayer Mini Audio Board:

Alt text

Alt text

Basic Usage

input.onButtonPressed(Button.A, function () {
    dfplayermini.playLoopAllFiles()
})
input.onButtonPressed(Button.B, function () {
    dfplayermini.setEQ(dfplayermini.EQ.Rock)
})
input.onButtonPressed(Button.AB, function () {
    dfplayermini.setEQ(dfplayermini.EQ.Jazz)
})
dfplayermini.connect(SerialPin.P0, SerialPin.P1)
basic.forever(function () {

})

Use ||connect|| to connect to Xuefeng DFPlayer Mini Audio Board.

Use ||playLoopAllFiles|| to play loop all files.

Use ||setEQ|| to set EQ for DFPlayer mini.

Demo

setup DFPlayer Mini

micro:bit + DFPlayer audio board

Alt text

makecode code

Alt text

Supported targets

License

MIT

dfplayermini=github:51bit/dfplayermini#v0.1.6