SnijderC / dyplayer

Abstracton for DY-XXXX mp3 player modules over UART.
Other
110 stars 30 forks source link

Arduino IDE 2.X requires different order of includes #55

Open Jeff-Haas opened 1 year ago

Jeff-Haas commented 1 year ago

In SoftwareSerial.ino, the order of includes needs to be updated.

Current version: #include <Arduino.h> #include "DYPlayerArduino.h" #include <SoftwareSerial.h>

This will get an error on compilation in Arduino IDE:

Compilation error: 'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'?

The sketch needs to be edited so the includes are in this order: #include <Arduino.h> #include <SoftwareSerial.h> #include "DYPlayerArduino.h"