MP3 UART voice module on D1 mini pin D7/D8 not working
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
I run a test with the MP3 UART voice module connecting to an Ardunio Uno on pins ⅔ via the supported cables and everything ran just fine.
So I moved over to my target setup, which is a Wemos D1 mini. I soldered the connection to the only free pins I have left on this project: D7 & D8.
For some reason this is not working at all. I get no sounds from the speaker and I am not sure why that is.
when giving power, the busy led on the sound module flashes up, indicating it is powering up.
I took these measurements on the sound module:
- the VCC pin has 3.3 V.- the TX pin has 3.3V (I find this strange. But I never checked the TX pin while I had it all connected via the cable on the Uno)- the RX pin has 0.2 V (intepret this as that the module is receiving a serial connection. I dont have a good oscyloscope to check this further. The one built in my volt meter is just a gimmick and of no use).This is my code:
/*
* @file Voice Module.ino
* @brief
* @n [Get the module here]
* @n This example Set the voice module volume and playback
* @n [Connection and Diagram]()
*
* @copyright [DFRobot](https://www.dfrobot.com), 2016
* @copyright GNU Lesser General Public License
*
* @author [carl]([email protected])
* @version V1.0
* @date 2017-11-3
*/
#include <SoftwareSerial.h>
SoftwareSerial MP3(D7, D8); //RX,TX
unsigned char order[4] = { 0xAA, 0x06, 0x00, 0xB0 };
void setup() {
Serial.begin(9600);
MP3.begin(9600);
Serial.println("serial initiated");
volume(0x1E); //Volume settings 0x00-0x1E
Serial.println("Volume set");
}
void loop() {
Serial.println("playing...");
play(0x01); //Play the specified audio:0x01-file0001
// Serial1.write(order,4);//order play
delay(2000);
}
void play(unsigned char Track) {
unsigned char play[6] = { 0xAA, 0x07, 0x02, 0x00, Track, Track + 0xB3 };
Serial1.write(play, 6);
}
void volume(unsigned char vol) {
unsigned char volume[5] = { 0xAA, 0x13, 0x01, vol, vol + 0xBE };
Serial1.write(volume, 5);
}
Is this not working due to using specifically D7 & D8? I remember reading somewhere that you can excplicitly change the pin function to GPIO, but I cannot find it anymore.
I am kind of stranded on this issue and any help is apreciated
I believe now this has to do with SoftwareSerial not working on the ESP8266. There is a espsoftwareserial library available, but I don't get anything working with that either. Has someone successfully used espsoftwareserial and could give me a hint on how to set it up?
![userHeadPic](https://dfimg.dfrobot.com/dfPortrait2.png)