I have successfully connected the UART2 TX/RX to the UT390B laser rangefinder and sent commands to it in Arduino. But it seems misunderstood the command in Ardupilot due to baud rate or some other settings.

In Ardupilot code, I have initialized the uartC port like this:

hal.uartC->begin(115200);

and send the same initialization command using:

const uint8_t INIT_SEQUNENCE[10] = {'*','0','0','0','8','4','5','5','3','#'};

hal.uartC->write(INIT_SEQUNENCE, 10);

Is there any other source of problem I can look at?

Thanks for reading.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • It turned out that the board and the laser range finder need common ground.

This reply was deleted.

Activity