sds-dust-sensors-arduino-library
sds-dust-sensors-arduino-library copied to clipboard
Add option for custom rxPin and txPin with HardwareSerial (e.g. for ESP32)
trafficstars
ESP32 boards support remapping of GPIO pins to Serial ports (UART0/1/2).
This PR enhances API in Serial.h with an option to pass custom rxPin and txPin to HardwareSerial. It keeps all usage options of the former API (i.e. for using SoftwareSerial), so this change shouldn't break any code created before this PR.