Skip to content

Issue 01 - not working #1

@nimasaj

Description

@nimasaj

Thanks for sharing your code.
Although, I couldn't make it work with following code on Arduino Nano. It always returns -9999.
Sensor in use is MaxBotix 7369 (HRXL-Maxsonar-WRM PN:MB7369) and connection is established through Serial line (Pin5 of sensor).

#include "Maxbotix.h"
Maxbotix MXB;


void setup() {
  Serial.begin(9600);
  MXB.begin(2);
  delay(500);
}

void loop() {
  int16_t d=MXB.GetRange();
  //MXB.GetHeader();
  //String S=MXB.GetString();
  Serial.println(d);
  //Serial.println(S);
  delay(500);
}

I checked the source code and it never goes to this loop (line 191 in CPP file) https://github.com/NorthernWidget/Maxbotix_Library/blob/07db50933100ed03bd27a6530a33efd5a8b5479b/Maxbotix.cpp#L191

the sensor I'm working with is working and returning correct values when I check with Logic Analyzer.

Values captured in logic analyzer are like the followings:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions