I have a serial MP3 player that I can get to work from other controllers using Arduino IDE. The serial message it expects to, for example, play the first song on its SD card is:
0x7E, 0xFF, 0x06, 0x03, 0x00, 0x00, 0x01, 0xEF
I’ve been using the code:
#include <HardwareSerial.h>
void setup() {
Serial.begin(9600);
Serial1.begin(9600, SERIAL_8N1, 19, 21); //RX21 TX19
delay(5000); // wait chip initialization is complete
byte selecttf[] = { 0x7E, 0xFF, 0x06, 0x09, 0x00, 0x00, 0x02, 0xEF };
Serial1.write(selecttf, sizeof(selecttf)); // select the TF card
delay(2000);
byte volume[] = { 0x7E, 0xFF, 0x06, 0x06, 0x00, 0x00, 0x1E, 0xEF };
Serial1.write(volume, sizeof(volume)); //set volume to max
delay(2000);
}
void loop() {
byte play[] = { 0x7E, 0xFF, 0x06, 0x03, 0x00, 0x00, 0x01, 0xEF }; //// Play first mp3 on card
Serial1.write(play, sizeof(play));
delay(20000);
}
When I try to send it from my ThingPlus USB-C it doesn’t work.
When reading back the serial it was sending it sends most HEX correctly, except that it sends 0xFF as 0xFFFFFFFF and 0xEF as 0xFFFFFFEF
I can’t for the life of me find a way to get the ThingPlus to send the serial message I am coding. Any ideas?