View Single Post
  #17   Spotlight this post!  
Unread 12-01-2015, 20:45
WDB WDB is offline
Registered User
FRC #2363
 
Join Date: Jan 2015
Location: Virginia
Posts: 4
WDB is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by seg9585 View Post
Correct. I still had my sensor power pins plugged into the I2C power and ground ports, which seem to work (for what it's worth).

Also, if you execute myLidar.start(); in your init area or constructor, you can access myLidar.getDistance() in both autonomous and teleOp methods and allow it to run its own thread, which will help avoid bogging down the rest of your code (because the update() method includes delay timers up to ~10ms to write and read).
We tried the I2C port too and failed. Moved over to the MXP and still getting zeroes.

Using lidar.start() in the teleopInit and calling lidar.getDistance() in teleopPeriodic which is returning zero. Am I missing anything?

Thanks!