Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: Minor Glitch Reading Maxbotix MB7389 with Mayfly

Home Forums Mayfly Data Logger Minor Glitch Reading Maxbotix MB7389 with Mayfly Reply To: Minor Glitch Reading Maxbotix MB7389 with Mayfly

#12346

Kevin and David, thanks for posting these issues with the MaxSonar. David, thanks also for the photos!

I’ve also had funkiness with my Maxbotix deployments this summer when using the EnviroDIY ModularSensors library. For me it just seemed like it was repeating the last values.

David, thanks for showing everyone that quick fix and for helping me make the connection that the issue was likely with with SoftwareSerial_ExInts. I think that has been the trouble, but in an indirect way.

Anyways, I think it’s been fixed on one of our development branches, which I’ll point you two to for testing.

The history is that Sara Damiano did a ton of work this spring to stabilize code, especially with anything related to SoftwareSerial including Arduino-SDI-12 (see ModularSensors/releases and also Arduino-SDI-12/releases. However, she didn’t quite finish pulling all of that work back into an official release before heading out on maternity leave. See https://github.com/EnviroDIY/ModularSensors/pull/153. Anyways, one of her commits (e1e3ecc) added a buffer cleaning step to the MaxBotixSonar.cpp. The code in her pull request also points to an updated version of the Arduino-SDI-12_ExtInts library.

Anyways, I’ve successfully gotten stable data from a MaxSonar with the new code with at:

;ModularSensors *calcVar* branch as of June 4, 2018: head, 52 commits ahead of 0.11.6 https://github.com/EnviroDIY/ModularSensors.git#4a10279e1031513391ce03d1914684ce5db812ff

If either of you use PlatformIO IDE, you can easily reconfigure your libraries to point to this code by adding the line above to your .ini file.

Otherwise, download the repo at that point in the commit tree by going here:
https://github.com/EnviroDIY/ModularSensors/tree/4a10279e1031513391ce03d1914684ce5db812ff

Let us know how that works. Meanwhile, I’ll be working toward moving that into a new release.