Go Down

Topic: SoftwareSerial Constructor - incomplete documentation? (Read 1 time) previous topic - next topic


Jun 20, 2012, 03:59 pm Last Edit: Jun 20, 2012, 06:10 pm by Andy2No Reason: 1
I've been reading the documentation and what I've been told, and read, about the SoftwareSerial library is at odds with the documentation page for the constructor.

On http://arduino.cc/en/Reference/SoftwareSerialConstructor it only shows two parameters.  As I now understand it, there's an optional third parameter, to set inverted logic, which hasn't been mentioned.

Quote from: http://arduino.cc/en/Reference/SoftwareSerialConstructor

SoftwareSerial(rxPin, txPin)


A call to SoftwareSerial(rxPin, txPin) creates a new SoftwareSerial object, whose name you need to provide as in the example below.

It seems the SoftwareSerial library is this: http://arduiniana.org/libraries/newsoftserial/

That being the case, the documentation is out of date, and the description of the constructor needs to include this:

Quote from: http://arduiniana.org/libraries/newsoftserial/

Signal Inversion

"Normal" TTL serial signaling defines a start bit as a transition from "high" to "low" logic.  Logical 1 is "high", 0 is "low".  But some serial devices turn this logic upside down, using what we call "inverted signaling".  As of version 10, NewSoftSerial supports these devices natively with a third parameter in the constructor.

NewSoftSerial myInvertedConn(7, 5, true); // this device uses inverted signaling

NewSoftSerial myGPS(3, 2); // this one doesn't

Quote from: http://arduiniana.org/libraries/newsoftserial/

change all NewSoftSerial references to SoftwareSerial.


Jun 21, 2012, 03:11 am Last Edit: Jun 21, 2012, 03:13 am by Andy2No Reason: 1
Is there a better place to report mistakes / omissions in the documentation?

On each Reference section page it says they should be posted in the forum, but gives a link to Arduino Forum :: Development :: Other Software Development which just doesn't seem like an appropriate place to discuss it.

For the documentation to improve, and grow, there needs to be an easy way to point out errors like this, or suggest additions.  At the moment, it's quite unclear how to go about it.

Go Up