NeoSWSerial
NeoSWSerial copied to clipboard
fix: prevent RX pin from receiving garbage data
In some use cases of NeoSWSerial, the RX pin might be "disconnected/open drain" for some reason or another. In such a case, RX pin can switch on and off randomly therefore causing random pieces of data to be received. The solution I propose is simple: set mode of RX pin as INPUT_PULLUP instead of just INPUT so that whenever this pin becomes open drain, the state of this pin will be interpreted as idle (not receiving any data).