DFRobot / DFRobot_DF1201S

Here comes the DFPlayer Pro-a mini simple but powerful MP3 Player! This MP3 player module supports four controlling modes: Arduino, AT command, on-board buttons, and ADKEY. You can directly press the on-board button to play or switch music without using a controller. By using a USB cable, you can easily copy your favorite songs into this module to play them any where you want, or use it as a sound card for your PC or Raspberry Pi after connecting them together.
MIT License
7 stars 5 forks source link

Arduino UNO R4 #17

Open kaspall opened 5 months ago

kaspall commented 5 months ago

There is an issue with this board.

/Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp: In member function 'DFRobot_DF1201S::ePlayMode_t DFRobot_DF1201S::getPlayMode()': /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'char') playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) String & operator = (const String &rhs); ^~~~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:97:11: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: conversion from 'char' to 'const arduino::String' is ambiguous playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::FlashStringHelper*) String(const FlashStringHelper str); ^~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:74:2: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const arduino::__FlashStringHelper' [-fpermissive] playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char) String(const char cstr = ""); ^~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:70:2: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const char' [-fpermissive] playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char) String & operator = (const char cstr); ^~~~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:98:11: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const char' [-fpermissive] playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::FlashStringHelper*) String & operator = (const FlashStringHelper str); ^~~~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:99:11: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const arduino::__FlashStringHelper' [-fpermissive] playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) String & operator = (String &&rval); ^~~~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:100:11: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: conversion from 'char' to 'arduino::String' is ambiguous playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::FlashStringHelper*) String(const FlashStringHelper str); ^~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:74:2: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const arduino::__FlashStringHelper' [-fpermissive] playMode = str[10]; ^ In file included from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/IPAddress.h:24:0, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/ArduinoAPI.h:30, from /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/Arduino.h:4, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.h:17, from /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:12: /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char) String(const char cstr = ""); ^~ /Users/tiagocarvalho/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.2.0/cores/arduino/api/String.h:70:2: note: conversion of argument 1 would be ill-formed: /Users/tiagocarvalho/Documents/Arduino/libraries/DFRobot_DF1201S/src/DFRobot_DF1201S.cpp:65:21: error: invalid conversion from 'char' to 'const char*' [-fpermissive] playMode = str[10]; ^

exit status 1

qsjhyy commented 5 months ago

This is probably because your compile-restriction level is higher and does not support some default type conversions, you can try to lower the compile restriction level, or modify the library to force type conversions. This library is really old and should be updated and maintained in the future when available.