kaiaai / LDS

Arduino LiDAR library supporting YDLIDAR X2/X3/X4, RPLIDAR A1, Xiaomi LDS02RR, Neato XV11, LD14P, CAMSENSE X1, Delta-2A/2B/2G
Apache License 2.0
72 stars 6 forks source link

Support for RPLidar C1 #4

Open sepastian opened 1 day ago

sepastian commented 1 day ago

Hello, thanks for this great library!

I own an RPLidar C1. The documentation states on page 7 that:

The RPLIDAR C1 adopts traditional sampling protocols and the high-speed sampling protocol for outputting the 5000 times per second laser range scan data. The RPLIDAR C1 is compatible with all communication protocols used by previous RPLIDAR S Series products and the traditional sampling protocol (standard) of the A Series products, users can directly in place of previous RPLIDAR models and use it in the original system.

So, theoretically, LDS should be supporting the C1 already - correct?

I noticed that the C1 is using a baud rate of 460800, though. I changed that in https://github.com/kaiaai/LDS/blob/main/examples/lds_basic_esp32/lds_basic_esp32.ino, but cannot get the Lidar to return any data. The ESP32 doesn't seem to be able to connect to it.

Am I missing something (obvious)?

Which steps would be involved in adding the RPLidare C1 to LDS?

Thanks!

sepastian commented 23 hours ago

Another question, since the hardware part is not my strength:

Do the Lidar and the ESP32 require a common ground connection?

I'm connecting the ESP32 to my PC via USB, to get serial output for debugging.

The Lidar is connected to a power supply.

Can that work?

kaiaai commented 6 hours ago

Hi sepastian, the LiDAR and the ESP32 grounds have to be connected together. Also