Open ronibandini opened 1 year ago
Thank you very much for the tip
Same problem occurs with Raspberry PI Pico under Arduino. The correct replacement should be: playMode = str[10]; to: playMode += str[10];
playMode = (const char*)str[10]; -> works incorrectly in my case
Same here with Arduino Every on PlatformIO.
Changed to: playMode = String(str[10]); and it works
playMode = (const char*)str[10]; -> also works for me
If you get this error
C:\Users\R\Documents\Arduino\libraries\DFRobot_DF1201S-master\src\DFRobot_DF1201S.cpp:65:21: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'char') playMode = str[10]; ^ Open DFRobot_DF1201S.cpp
And replace playMode = str[10]; by playMode = (const char*)str[10];
If you want to use DfPlayer Pro with UNO R4 Minima, replace in the Play.ino example
if defined(ARDUINO_AVR_UNO) || defined(ESP8266)
include "SoftwareSerial.h"
SoftwareSerial DF1201SSerial(2, 3); //RX TX
else
define DF1201SSerial Serial1
endif
by
SoftwareSerial DF1201SSerial(2, 3);