Home › Forums › Mayfly Data Logger › Wiring Ultrasonic sensor w/ temp compensator › Reply To: Wiring Ultrasonic sensor w/ temp compensator
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
Now running DRWI_NoCellular.ino on Logger XXXXX Using ModularSensors Library version 0.25.1 Logger timezone is set to UTC -5 RTC timezone is set to UTC Current RTC time is: 2020-07-31T11:46:29-05:00 SonarRange has a non-unique UUID! Battery has a non-unique UUID! 12345678-abcd-1234-ef00-1234567890ab -> SonarRange 12345678-abcd-1234-ef00-1234567890ab -> Battery 12345678-abcd-1234-ef00-1234567890ab -> BoardTemp This logger has a variable array with 3 variables, of which 3 come from 3 sensors and 0 are calculated. Sampling feature UUID is: 12345678-abcd-1234-ef00-1234567890ab Logger portion of setup finished. Setting up sensors... Setting up file on SD card Data will be saved as XXXXX_2020-07-31.csv Putting processor to sleep ------------------------------------------ Dumping Header Lines from MaxBotix on sonarStream_trigger-1 <--MaxBotixSonar 0 - SCXL-MaxSonar-WRMT <--MaxBotixSonar 1 - MB7589-1XX <--MaxBotixSonar 2 - Copr. 2011-2019 <--MaxBotixSonar 3 - MaxBotix Inc. <--MaxBotixSonar 4 - R71 0819 <--MaxBotixSonar 5 - TempE <--MaxBotixSonar Dumping 6 characters from MaxBotix stream buffer: <--MaxBotixSonar 824857495713 MaxBotixMaxSonar at sonarStream_trigger-1 is reporting: <--MaxBotixSonar |
Thanks,
Matt