View Single Post
  #7   Spotlight this post!  
Unread 31-01-2014, 21:15
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 61
dvanvoorst is an unknown quantity at this point
Re: Ultrasonic analog input?

With an Ultrasonic sensor, you need to either tell it to ping, or set it to automatic ping mode. Otherwise it will read maximum distance.

Add this to your robotInit():

distance.setAutomaticMode(true);
Reply With Quote