As the title says... Chat on...

User avatar
By huananmaun
#31008 ESP8266 with MP3 DFPlayer module using Lua

I try to port my DFPlayer MP3 module of Arduino to ESP8266.
http://www.dfrobot.com/wiki/index.php/D ... KU:DFR0299

It works not bad in Arduino.
https://www.youtube.com/watch?v=CDrvpgpIxR8

I have tried to catch the command to control DFPlayer module.

VOL=6
7E FF 6 6 0 0 5 FE F0 EF
Play next
7E FF 6 1 0 0 0 FE FA EF
Play all
7E FF 6 D 0 0 0 FE EE EF

I list my code as below.

Code: Select alluart.setup( 0,9600,8,0,1,0 )
msg = "7EFF060D000000FEEEEF"
for i = 1,string.len(msg),2 do
byte =("0x"..string.sub(msg,0+i,1+i))
uart.write(0,tonumber(byte))
end


However, it did not work in ESP8266. Any help is welcome.