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

#14414
Matt Barney
Participant

    I’ve probably done something dumb in my code, but can’t see what it is, so I could use another set of eyes on it…

    I’ve got a MaxBotix MB7589 SCXL-MaxSonar-WRMT and have it communicating via NeoSWSerial on pin 7. Using the single_sensor.ino example, it works fine. Now I’m trying to integrate it a logging sketch, based on DRWI_NoCellular.ino, and I never get any readings displayed nor written to the SD card. Code is attached. If I comment the sonar_range variable out of the variableList, it works, and the remaining variables get successfully logged.

    Here is the debug output after turning on the debug flag in MaxBotixSonar.h:

    Thanks,
    Matt