that your Lidar Lite is the original (V1) Lidar Lite? I’ve heard that there are some differences in behavior w/the new V2 Lidar Lite (I think it has a blue label on it, whereas the V1 has a silver label)
since the Lidar Lite is receiving power from the navX-MXP, and since it requires 5VDC input voltage, can you confirm that the voltage select jumper on the navX-MXP is set to 5VDC (as opposed to 3.3VDC)?
Our team has also tried to get the Lidar-Lite to work, without success. We have the original (silver label) version. We tried the RoboRio standalone port as well as chained through the NavMXP I2C ports, with a without pullups, and different voltage supplies.
It works fine on an Arduino.
I also just bought the lidar lite and am have a lot of trouble getting it to work withthe roborio. I found some other sources but have not had any luck with them
V2 or V1? I’ve heard that the I2C protocol for communication to V1 is different than V2…
I’m suspicious of you can’t get it working on an Arduino that (if you’ve verified your wiring) you are using V1 protocol to talk to V2, or vice versa. Definitely recommend getting this working before going further w/the RoboRIO.
5V. Sorry I should have mentioned it in my original email.
The same Lidar wiring and setup was used successfully on an Arduino last summer to measure distance. So we are sure that Lidar is OK. But this device has no status LED to tell me otherwise.
My first round of testing with this is indicating that the RoboRIO MXP I2C port is behaving a bit differently from how it did last year, which impacts the LidarLITE communication.
Summary of Last year: We were able to get LidarLite (V1) working using the MXP I2C port (plugged into the navX-MXP I2C Expansion connector), but NOT able to get LidarLite to work w/the same code via the RoboRIO’s onboard I2C connector.
This year the behavior has reversed!
Now this year: We are able to get LidarLite (V1) working using the RoboRIO onboard I2C port, but not using the MXP I2C port (plugged into the navX-MXP I2C Expansion port). The same code was used, the only difference was the Port enum value passed into the LidarLITE constructor specified a different port.
When it doesn’t work, all 0s are returned, and the WPI library indicates that the transaction was aborted.
Attached are the two small java code files used in the test. As noted in the comment in robotInit() method of Robot.java, it works w/the RoboRio onboard I2C port, but not w/the MXP I2C port.
I do plan to break out a logic analyzer and see if I can figure out what’s different on the two ports, but don’t know when I’ll get a chance to do that, maybe this weekend.
But I would recommend trying the RoboRIO onboard I2C connector, which works for me using the 2016 firmware.
My V1 sensor worked fine w/the 3.3V power pin from the RoboRIO onboard I2C connector - but you could provide it 5V power instead from one of the 5V RoboRio power rails (or the VRM) and that should work too.