-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Component: CoreRelated to the code for the standard Arduino APIRelated to the code for the standard Arduino APILibrary: SoftwareSerialThe SoftwareSerial Arduino libraryThe SoftwareSerial Arduino library
Description
In version 1.6.0 (at least) of the IDE the constructor for SoftwareSerial does this:
setTX(transmitPin);
setRX(receivePin);
setTX does this:
pinMode(tx, OUTPUT);
digitalWrite(tx, _inverse_logic ? LOW : HIGH);
This is not an appropriate time to be doing pinMode or digitalWrite because init() has not been called yet. Who knows what init will do with pins? It might set them all to inputs, for example.
Metadata
Metadata
Assignees
Labels
Component: CoreRelated to the code for the standard Arduino APIRelated to the code for the standard Arduino APILibrary: SoftwareSerialThe SoftwareSerial Arduino libraryThe SoftwareSerial Arduino library