Please I need idea for this laser rangefinder to work found on ebay..
I need atleast library or related sample program.. thanks!
According to ebay link, it's just a matter of serial communication. Connect RX/TX to arduino, setup a SoftwareSerial and write those commands (letters)
How about transferring it to the arduino micro? Any idea about the code?
I think I found a useful link but i didn't understand well..
LIDAR
Thanks!
That code is in python, you need to translate it to C (arduino). Something like this:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // your arduino RX, TX pins
String str= "";
void setup()
{
// Open serial communications to write to screen:
Serial.begin(9600);
Serial.println("Starting program:");
// set the data rate for the SoftwareSerial port
mySerial.begin(19200);
}
void loop() // run over and over
{
Serial.print("Taking measures... ");
mySerial.println("C");
if(mySerial.available() > 0)
{
str = mySerial.readStringUntil('\n');
}
Serial.println(str);
delay(500);
}
I'm curious about this sensor, let me know if is working and reliable
I try your code but nothing happen..
Output image attach below..
Please help me.. I don't know anything about phython..
I made a mistake on my code, you have to send the letter "D" not "C"
So, replace mySerial.println("C") for mySerial.println("D")
Note that this code is just to guide you, not a perfect receipe...
To work with that module (according with ebay link) you send a command by serial comm and wait for the response. If you are not getting any answer, You can try several things:
- swap RX / TX wires
- replace mySerial.println("D") for mySerial.print("D\r\n");
- put a delay (50) after mySerial.println("D")
Also note that arduino operates normaly on 5V, that module operates at 2,9V. You will need a level shifter or resistor in the arduino TX wire or you could damage the sensor.
According with ebay link, there's a USB adapter and a software to test the unit, did you tried it first?
Did you made it work? I'm curious about this module...
It's working, I follow your instruction, but the measurement is still random code ( i don't know that language like ??///#&blablablaa. I'll try to fix it. But thanks , because from this instruction I can operate this Laser Rangefinder Module, B605B, RS232, 100M distance measurement. . Maybe you can help me?
geologic:
That code is in python, you need to translate it to C (arduino). Something like this:#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // your arduino RX, TX pins
String str= "";
void setup()
{
// Open serial communications to write to screen:
Serial.begin(9600);
Serial.println("Starting program:");
// set the data rate for the SoftwareSerial port
mySerial.begin(19200);
}
void loop() // run over and over
{
Serial.print("Taking measures... ");
mySerial.println("C");
if(mySerial.available() > 0)
{
str = mySerial.readStringUntil('\n');
}
Serial.println(str);
delay(500);
}
I'm curious about this sensor, let me know if is working and reliable
ignatius_vito:
It's working, I follow your instruction, but the measurement is still random code ( i don't know that language like ??///#&blablablaa. I'll try to fix it. But thanks , because from this instruction I can operate this Laser Rangefinder Module, B605B, RS232, 100M distance measurement. . Maybe you can help me?
Did you manage to make it work? Can you post the output?
Hunting is my favorite hobby and I do it whenever I have the free time. I really hope I can teach my son how to do it one day and I hope that he will love it. I just hope that he doesn't become one of the animal rights protection people or a vegan. I hunt because I want the best quality meat for my family. I wasn't always a good hunter because I didn't know that If you use rangefinders it is much easier. I decided to get a laser rangefinder online and they recommended an HD scope to me and I got both of them. My hunting improved a lot with the right equipment and that ATN rangefinder and scope are amazing.
Unfortunately the OP asked for help but never help others with his experience... >:(
That module works using serial communication, you send a text command and wait for the response.
The module came with a USB adapter and some software, so try it first to see if it works.
I don't have any module or know the software, but it seems that you have to send a "D" char and wait for module response.
Please share your progress, i would like to know if this sensor is good or not.