sds-dust-sensors-arduino-library icon indicating copy to clipboard operation
sds-dust-sensors-arduino-library copied to clipboard

Add option for custom rxPin and txPin with HardwareSerial (e.g. for ESP32)

Open cyberman54 opened this issue 3 years ago • 0 comments
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.

cyberman54 avatar Feb 16 '22 09:02 cyberman54