View Single Post
  #2   Spotlight this post!  
Unread 11-01-2013, 16:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming ultrasonic rangefinders

What specific sensor are you planning to use, and what kind of signal does it provide to the control system? Some have an analog voltage which is proportional to the range. Others have a PWM signal that varies depending on the range. Still others are a serial (e.g. SPI or I2C) connection that encodes a number.

Whatever you get, it's almost certainly going to be a simple matter of multiplying the value by an appropriate constant to turn it into a distance in whatever units you want.
Reply With Quote