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: Wiring Ultrasonic sensor w/ temp compensator

Home Forums Mayfly Data Logger Wiring Ultrasonic sensor w/ temp compensator Reply To: Wiring Ultrasonic sensor w/ temp compensator

#2355
fisherba
Participant

    Hi all,

    I just wired up a temp compensation on MB7389, and after I dumped everything and re-cloned the modular library master branch (managed through GitHub Desktop) after the re-clone it worked for me.

    This example sketch that Sara recommended above also seems to work ok (in pin 5).
    https://github.com/EnviroDIY/EnviroDIY_Mayfly_Logger/blob/master/examples/mayfly_sonar/mayfly_sonar.ino

    The sonar test from the modular library master branch (in pin 11) returns a distance and indicates “good result found” and the response matches the distance I’m measuring.
    https://github.com/EnviroDIY/ModularSensors/blob/master/sensor_tests/sonar_test/sonar_test.ino

    The single sensor example from the modular library master branch (in pin 11) oscillates between returning a good distance and one that is 6 meters further than reality.
    https://github.com/EnviroDIY/ModularSensors/blob/master/examples/single_sensor/single_sensor.ino

    After commenting out several of the extra sensors, I was also able to run it on the multisensor print sketch.
    https://github.com/EnviroDIY/ModularSensors/blob/master/examples/multisensor_print/multisensor_print.ino

    I have attached a photo of my wiring. @srgdamiano, great work on the modular library!