Pages: [1]   Go Down
Author Topic: SoftwareSerial Constructor - incomplete documentation?  (Read 876 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

SoftwareSerial(rxPin, txPin)

Description

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:

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

change all NewSoftSerial references to SoftwareSerial.
« Last Edit: June 20, 2012, 11:10:11 am by Andy2No » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 20, 2012, 08:13:34 pm by Andy2No » Logged

Pages: [1]   Go Up
Jump to: