Skip to content

Request for DFPlayer Mini Driver/Library for ESP8266 with Moddable SDK #1441

Discussion options

You must be logged in to vote

Finally, it works! It turns out that I needed to include onReadable. It seems to be required to forward commands sent to the Serial. Perhaps I wasn't careful enough when reading the documentation.

const serial = new device.io.Serial({
  ...device.Serial.default,
  baud: 9600,
  format: "number",
  // This part solved my problem
  onReadable: function (count) {
    while (count--) this.write(this.read());
  },
});

I might release the DFPlayer library soon after this. Thank you!

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@akbaraditamasp
Comment options

@phoddie
Comment options

@akbaraditamasp
Comment options

@akbaraditamasp
Comment options

Answer selected by akbaraditamasp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants