View Single Post
  #1   Spotlight this post!  
Unread 15-01-2017, 15:29
godkane godkane is offline
Registered User
FRC #3875
 
Join Date: Jan 2014
Location: Grand Rapids, MI
Posts: 12
godkane is an unknown quantity at this point
RPLIDAR with java

I'm having issues getting the RPLILDAR v2 working with the default serial driver in java with the RoboRIO. I have no issues communicating when connected to a PC with my own C# code or provided C libraries.

Here is the webpage with the lidar including SDK documentation and code:
http://www.robotshop.com/en/rplidar-...r-scanner.html

Here is a simple command to have the LIDAR spin.
SerialPort sp = new SerialPort(115200, SerialPort.Port.kUSB1, 8, Parity.kNone);
byte[] b = new byte[5];
b[0] = (byte)0xa5;
b[1] = (byte)0xf0;
b[2] = (byte)0x90;
b[3] = (byte)0x01;
b[4] = (byte)0xc5;
sp.write(b, b.length);
sp.flush();

I do seem to be able to get basic health commands to work, just the more advanced commands such as spin and get reading do not work.

I have also connected V5 power to the power connector on the RPLidar board.

Any help would be appreciated.
Reply With Quote