View Single Post
  #14   Spotlight this post!  
Unread 16-01-2013, 10:50
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: Programming ultrasonic rangefinders

Quote:
Originally Posted by mrklempae View Post
am I the only person who can't seem to get this to work? I'm not completely sure how to do this, but one of the other programmers (better than myself) tried to get it working to no avail...
The way the sensor is wired is also important, the code I provided is for operating in analog mode (not PWM mode), and the wiring must account for that.

For debugging the sensor itself you can put a multimeter probe on the analog line and see what value it is sending to the cRio (a voltage level that should change the closer the sensor is to something).

Once you see values on the multimeter that correspond to distance, then you debug code. If you need more help, please post actual details on what you've done and what you see.
Reply With Quote