Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: SDI12/Software Serial library conflicts: Arduino-based data logger

Home Forums Other Data Loggers SDI12/Software Serial library conflicts: Arduino-based data logger Reply To: SDI12/Software Serial library conflicts: Arduino-based data logger

#9365
Sara Damiano
Moderator

    I’m sorry, you can’t just update the library, you have to actually open and change the cpp files from both SoftwareSerial and the SDI-12 libraries if you want to use them together. All updating did was remove the warning about ‘util/parity’ (which is now gone from even your verbose log).

    That being said, yes, unless you have a very good reason not to use hardware serial, the hardware serial port on the Mega should do a better job of communicating with the Mini than any software port on the Mega would do. (Always, always, always use hardware serial unless you have no other choice!) If you do that, then you can simply not include SoftwareSerial in your sketch at all and you won’t have any compile errors. The only problem would be if you want the Mini to talk to both SDI-12 instruments and the Mega because the Mini Pro doesn’t have an extra hardware serial port. To get the Mini running with both libraries, you have to open and change the cpp’s.

    You can’t upload your sketch as an attachment without first changing it to a txt file, but you can use the “Add Code Snippet” button and paste the contents of your sketch in there and it will appear in your post as code.