View Single Post
  #2   Spotlight this post!  
Unread 16-11-2012, 23:05
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: Programming for sonar with MaxRobotix Sensor

You can get a reading from a sensor by getting the voltage output by the sensor. Which can be done like this:
Code:
private AnalogChannel ultrasonic = new AnalogChannel(1);
private double voltage = ultrasonic.getVoltage();
Reply With Quote