RPLIDAR C1 Not Detected on Arduino Mega
I am trying to use RPLIDAR C1 directly to Arduino Mega via UART communication (Serial2).
However, every time I upload the program, the following output always appears:

4 Replies
And you already tried swapping the TX and RX wires in hardware?
I have already swapped it
Pinout looks correct.
acording to https://d229kd5ey79jzj.cloudfront.net/3157/SLAMTEC_rplidarkit_usermanual_C1_v1.0_en.pdf.

I actually don't understand your code. What library version are you using exactly? The
lidar.begin()
function does not return bool
.
Looking at https://github.com/DanCrank/rplidar_arduino/blob/master/RPLidarDriver/RPLidar.h.