Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 01 - not working #1

Open
nimasaj opened this issue May 13, 2019 · 0 comments
Open

Issue 01 - not working #1

nimasaj opened this issue May 13, 2019 · 0 comments

Comments

@nimasaj
Copy link

nimasaj commented May 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant