RPLIDAR A2 not working

Hello all,
I have the RPLIDAR A2 360 degree LIDAR system.
Pixhawk Orange Cube flight controller.
I am using Mission Planner
I am trying to implement obstacle avoidance on the system.
I have powered an arduino board (5V) with my computer.
After that, I have plugged in the 5V, Motor Controller, and ground wires from the RPLIDAR into the arduino
I have the TX/RX wires plugged into an adapter that is then plugged into the pixhawk board.
I have tried reversing the RX/TX wires on the Pixhawk board and still nothing.
The motor of the RPLIDAR spins, but every time the pixhawk screen says “Bad LIDAR Health”
Also, there is no data being transferred into the proximity screen on Mission planner either.
Can anyone point me in the correct direction?? Thank you in advance.

UPDATE: I got the RPLIDAR A2 working and mission planner is recognizing the readings. I ended up having to connect the ground from the arduino into the ground rail of the pixhawk. But now I have stumbled upon a new problem. 1. I must power on the pixhawk before I power on the lidar. If I power on the LIDAR first, it still remains as “Bad Lidar Health”. 2. The LIDAR spins and takes readings no problem for about the first 10-15 seconds. After that time interval, it seems as if the motor is having trouble spinning and then it will stop spinning altogether, start back up at a lower spin rate, then keep switching in that pattern back and forth. Is there any remedy for this type of behavior? Thank you again in advance.

I had the same problem powering the rplidar. I think that some work has been done on the rangefinder library so I would suggest to download the 4.1 beta if you can take the risk, to check if this can solve that problem. @Eosbandi also prepared a driver for the rplidar s1 that could work for the rplidar a2 with minor changes. finally, there is a pin to control the motor speed of the rplidar. I think that the ardupilot driver doesn’t use it, so I plugged it directly to a +5V. If your power supply is stable and doesn’t turn properly, it could be a hardware failure.

I did some more testing this morning. If I do not turn on the pixhawk, the LIDAR runs at full speed and has no stopping during the spin test. It only stops and slows down whenever I have the pixhawk turned on. Additionally, if the RPLIDAR stops for too long, it no longer sends data to the pixhawk anymore, then returns to the full spinning speed again. I am getting good data whenever the lidar is spinning, but I am stumped as to why it only spins at full speed with no problems whenever it is not connected to the pixhawk.

Did you using what RPLidar version ? A2M6, A2M7 or last version A2M8 ???