Comments (1)
Ok here is how I solve my problem. The only thig I'm not sure is if the constructor with no argument ( Player_DY::Player_DY() : _player(){};
) really works and if it is initiating a DYPlayer with hardware serial ?
`
#include <Arduino.h>
#include <DYPlayerArduino.h>
#include <SoftwareSerial.h>
SoftwareSerial serial(4, 5);
class Player_DY
{
private:
DY::Player _player;
public:
Player_DY::Player_DY(SoftwareSerial &serial) : _player(&serial){};
Player_DY::Player_DY(HardwareSerial &serial) : _player(&serial){};
Player_DY::Player_DY() : _player(){};
void begin()
{
_player.begin();
}
};
Player_DY playerSW(serial);
Player_DY playerHW(Serial1);
Player_DY player;
void setup()
{
player.begin();
playerSW.begin();
playerHW.begin();
}
void loop()
{ }
`
from dyplayer.
Related Issues (20)
- SoftwareSerial does not name a type HOT 4
- ONE_Line mode supports SLEEP mode HOT 1
- Issue with assigning MP3's to buttons HOT 1
- compilation error on AI Thinker ESP32-CAM: undefined reference to `DY::Player::Player(int, unsigned char, unsigned char)' HOT 2
- One_Line-Mode solved HOT 3
- Impossible to create Player with SoftwareSerial HOT 2
- Arduino IDE 2.X requires different order of includes
- Entering the equalizer settings command HOT 1
- compilation for Due
- 8 char filenames and paths won't play HOT 1
- ESP32 Support HOT 3
- Only short duration media files are playing HOT 1
- Problem using ESP on UART1 HOT 1
- Need help - Any way to exclude a directory from playing?
- is it possible to play a tune from Arduino, like frequency generator through DFplayers ? HOT 1
- dy-sv17f Set default volume HOT 1
- DY-HV8F with Raspberry Pico MicroPython using UART HOT 1
- Examples of using DYPLAYER with PIC controller?
- Combination Play - anyone got it working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dyplayer.