Go Down

Topic: Where has SoftwareSerial gone? (Read 7 times) previous topic - next topic

davekw7x

#5
Jan 17, 2011, 11:53 pm Last Edit: Jan 18, 2011, 07:34 pm by davekw7x Reason: 1
Quote
IDE won't open the .cpp file.


I wouldn't to put words in anyone's mouth, but I think the Arduino developers may have reasoned that people who want to look at .cpp (library) files would use a "real" programmers text editor rather than the toy editor built into the iDE.  (So you can't open just any old .cpp file in any old directory).

You can still create tabs in your own sketch and name them something.cpp or something.h and Arduino will create the files and save them in the sketch directory, but I think the IDE only lets you open "sketches" (by navigating to a directory that contains a .pde file) in the IDE File menu).

You can also create .cpp and .h files in a sketch directory with an external editor.

Anyhow...

Once you open a sketch, then the .pde and the .cpp and .h files in that directory appear on tabs in the IDE.  Since a library directory is not a sketch (has no .pde file), I don't think you can open a library .cpp directly in the IDE.  (I could be wrong.)

I've not been around long enough to know anything about releases older than about six or seven months, so I don't know if or when the functionality changed.


Regards,

Dave

floresta

#6
Jan 18, 2011, 03:58 pm Last Edit: Jan 18, 2011, 03:59 pm by floresta Reason: 1
Quote
NewSoftSerial is listed on the libraries but not as a replacement, just an improvement.
How are folks supposed to figure this out?
The prefix 'new' should provide a clue.

Don

gbulmer

Quote
The prefix 'new' should provide a clue.


Maybe I have seen the use of the word 'new' too often to believe it means anything other than 'new set of bugs' :-)

There have been several servo libraries, is one with 'New' in its name the one to use ?-)

Have you read NewSoftSerial? It is significantly more complex for a beginner to get to grips with and understand. So it may be technically superior (in some dimensions), but significantly inferior for other purposes i.e. learning.

I don't see why the SoftwareSerial library example referenced on that library page is not included in the Arduino IDE download, on the Examples menu. It looks like an error to miss it.

If someone has decided to make SoftwareSerial obsolete or deprecated, then there should be a clear statement in the code, and documentation (library and release notes) to say so.

If the recommended library is NewSoftSerial, put a clear statement at the top of the SoftwareSerial library page and the library reference page.

Then, everything is clear. No 'clues', or 'hints', or making things so awkward that it looks like a bug.

PaulS

#8
Jan 18, 2011, 04:36 pm Last Edit: Jan 18, 2011, 04:40 pm by PaulS Reason: 1
Quote
I don't see why the SoftwareSerial library example referenced on that library page is not included in the Arduino IDE download, on the Examples menu. It looks like an error to miss it.

The library IS included in the Arduino 0022 download for windows. The fact that examples are not should be a clue for you to stop using it.

gbulmer

#9
Jan 18, 2011, 07:21 pm Last Edit: Jan 18, 2011, 07:24 pm by gbulmer Reason: 1
Quote
The library IS included in the Arduino 0022 download for windows.

Understood
Quote
The fact that examples are not should be a clue for you to stop using it.

No. IMHO that is an awful, bad, bad way to handle obsolete or deprecated components.
As my old boss used to say "Assume makes an ASS of U and ME" :-)
We need to strive to be clear about boundaries and scope.

IMHO, removing the example, so that anyone gets to this state where they have to ask about it (already wasted time), and then responding "you can guess what status it must be when the example is missing" is not a Quality Approach (TM:-).

As I wrote, if it is obsolete or deprecated, it should be clear and unambiguous.

Write that it is obsolete or deprecated in the Libraries/Reference documentation, Release Notes and the code and example.

If it is not obsolete or deprecated, include the example so that folks can test it to get some confidence that it works, and see how it works. This is what usually happens for libraries included with the Arduino IDE, and it is very, very helpful.

IMHO Folks should never need to guess at the status of code included in the Arduino IDE.

If there is a library with some better features, include that comment right next to SoftwareSerial in the Libraries/Reference page, and even in the SoftwareSerial code example.

Otherwise bugs are even harder to find, and beginners are left wondering what to do.

I thought the lack of the SoftwareSerial example code (from the Library reference page) being included in the IDE download was a bug, and I still think it is a bug.

It is either a bug in :
- the contents of the download because the example code is missing, or
- in the reference documentation which should say it is deprecated and will be obsolete at some date or status, or
- in the process around deprecating components prior to making them obsolete, because IMHO it shouldn't ever be unclear.

Go Up