Hi, we want/are going to use a LIDAR-Lite v3HP for our robot to read 1d distance and we are doing PWM connections for it. We hooked up the lidar to the Rio’s PWM port and tried to read values from the Shuffleboard using Visual Studio Code by trying to use .getRawBounds() but it can’t seem to be able get human readable values. So we are wondering if anyone has any solution/example for the lidar. Anything would be useful.
It’s now possible to read a PWM signal through the DutyCycleEncoder class in WPILib, which should work for your use case. You would need to hook it up to the DIO ports, though.
Good point. My comment and 3504’s sample code were based on last year’s wpilib. We’
re using DutyCycleEncoder to read the LaserShark via DIO this year, so the same concept should work for LidarLite.