View Single Post
  #1   Spotlight this post!  
Unread 15-11-2012, 20:36
bs7280 bs7280 is offline
Registered User
FRC #3734
Team Role: Leadership
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Forest
Posts: 80
bs7280 has a spectacular aura aboutbs7280 has a spectacular aura aboutbs7280 has a spectacular aura about
Programming for sonar with MaxRobotix Sensor

Hi, we are trying to get a reading from our MaxRobotix Sensor that we have plugged into pin 1 of the Analog input. We are using java (NetBeans) for programming. Some of our code:

Declaring variable:
public static final Button ultrasonicSensor = new AnalogIOButton(1);

And inside out Autonomous section, we simply print out ultrasonicSensor.get();

It would be greatly appreciated if someone could help us get a reading from our sensor so that we can work with it
Reply With Quote