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: Atlas Scientific EZO logging program

Home Forums Mayfly Data Logger Atlas Scientific EZO logging program Reply To: Atlas Scientific EZO logging program

#2022
Shannon Hicks
Moderator

    The error you’re getting is because the SoftwareSerial library uses an interrupt method that conflicts with the SODAQ_PcInt library. In order to use those 2 libraries together, you have to use the modified versions of the libraries we posted in our Github repo, along with modifying the library names in your sketch in 3 places. Plus you’ll need to change the pins for your Atlas sensors to use 10 and 11 instead of 6 and 7. This is because the SoftwareSerialMod library ignores interrupts on the port that includes all of the analog pins (where the DS3231 interrupt is on A7) and it ignores pins D0-D7. This allows people to use the SDI12_Mod library to look at SDI12 sensors on pin D6 or D7.

    So download all of the libraries from our repo: https://github.com/EnviroDIY/Libraries/tree/master and be sure to follow the instructions on that page about how to download the .zip file from the tree and not use the green “clone or download” button.

    Once you have the libraries installed, restart you IDE and then modify the top section of your code to point to the new library filenames and update the pin numbers. It’ll look like this:

    I compiled your code with the above changes and get no errors.

    Or if all of this is too complicated, and you have Mayfly board v0.4, you can simply cut the trace on the back of the board on JP1 to change the clock interrupt from A7 to D10, so you can use the board’s third hardware interrupt pin to wake it up instead of using the PcInt pin change library. Then you can remove all reference to the PCInt library from your sketch, change the wakeup pin from A7 to 10, and then use the regular SoftwareSerial library, and putting your sensors back on D6-7. Another user brought this issue up recently: http://envirodiy.org/topic/low-power-project/