Closed noerw closed 5 years ago
Thank you for your work. SoftwareSerial is problematic and I think it is good idea to put it behind #ifndef directive. I'm not sure if only AVR based boards have this header so I leave the directive as you proposed.
There is also new release associated with your PR: https://github.com/lewapek/sds-dust-sensors-arduino-library/releases/tag/1.4.0
I put SoftwareSerial.h behind a
#ifdef
to support compilation for SAMD based boards which lack this header. According to https://github.com/thomasklingbeil/sds-dust-sensors-arduino-library/commit/eaa03da56f0585d57525ebe43086cf68de695c5b, ESP32 is affected as well.If only AVR based boards have the SoftwareSerial.h header, one could think about replacing the SAMD check for a
#ifdef (__AVR__) || (__avr__)
instead. But I'm not knowledgeable about SoftwareSerial.h to tell if this is a good idea.