View Single Post
  #25   Spotlight this post!  
Unread 11-01-2015, 20:23
tech2077 tech2077 is offline
Registered User
AKA: Matthew Skolaut
FRC #3847 (Spectrum 3847)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Houston
Posts: 21
tech2077 is an unknown quantity at this point
Re: LIDAR Sensor has arrived!

Quote:
Originally Posted by DavisC View Post
How do you (or anyone that has gotten this to work) implement this with the main class. I specifically am using the "Getting Started" example.

I tried using it something like this (don't have the exact code in front of me...):
Where variables are declared:
Code:
LIDAR myLidar = new LIDAR(port.kOnboard);
then in teleopPeriodic() I did:
Code:
myLidar.update();
System.out.println(myLidar.getPID());
However, 0.0 is only ever printed out to the Riolog. (I also tried having the myLidar.start() and myLidar.stop() inside of teleopInit and disabledInit respectively.

Thanks in advance,
DavisC
It's been discovered that the on board I2C port is having communication problems, use the I2C on the MXP port until the issue is resolved.