Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftwareSerial does not name a type #49

Open
PaulMPapa opened this issue Nov 22, 2022 · 4 comments
Open

SoftwareSerial does not name a type #49

PaulMPapa opened this issue Nov 22, 2022 · 4 comments

Comments

@PaulMPapa
Copy link

Hi there,

Thanks for your effort and sharing of the library.

Although i managed to connect and play sound, I am trying to use the software serial, but i can not get passed the compilation. The error message states :

SoftwareSerial:6:1: error: 'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'?
SoftwareSerial SoftSerial(10, 11);
^~~~~~~~~~~~~~
HardwareSerial
SoftwareSerial:7:20: error: 'SoftSerial' was not declared in this scope
DY::Player player(&SoftSerial);
^~~~~~~~~~
C:\temp\SoftwareSerial.ino:7:20: note: suggested alternative: 'Serial'
DY::Player player(&SoftSerial);
^~~~~~~~~~
Serial
exit status 1
'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'?

Any ideas how to fix it ? Kindly check the softserial example.

Thank you very much

Regards

@SnijderC
Copy link
Owner

Hey, can you share the board make and model? SoftSerial is only available on Arduino, and not only that, specific boards have specific ports of Arduino. E.g. the underlying hardware and peripherals are not the same between an Atmega based board vs ESP32, or STM32.. You could be using a board for which there simply isn't a SoftSerial implementation.

@PaulMPapa
Copy link
Author

Hi, thanks for replying. I am using an arduino nano.

@vinay-khare
Copy link

Hi, I am also facing the same issue. I tried on the Arduino Nano as well as the Uno both are not compiling the examples provided in this library. However the SoftwareSerial example from the default arduino library examples are working. Would appreciate any pointers to solve this. Thanks.

@Wilhelm1Daniel
Copy link

Very simple failure...

You have to include the SoftwareSerial.h first, then the DYPlayer...

Now it works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants