View Single Post
  #14   Spotlight this post!  
Unread 04-02-2008, 18:53
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Ultrasonic sensors on digital ports 3-6 problems

Thank you so much for the responses so far.

What I mean by the same value is that no matter the distance away from the sensor I get the same number, so my terminal looks like:

Code:
Distance1:1122   Time1: 875

Distance1:1122   Time1: 875

Distance1:1122   Time1: 875

Distance1:1122   Time1: 875
No matter the distance of my object. I am only using the timer for this so its ok, I took out the code for 1&2. They gave me back a time, and a distance that was accurate to about .5mm or so. Yeah, I was getting something around 24000 when there was nothing. I used that floating point because my shift method wasn't working. Thanks Kevin for pointing that out!
I am only using one sensor right now (sensor 3). I will make a few corrections right now, test it again, and re-upload my code to the same link.

Okay, its updated with a few minor tweaks. I still can't get this though. More testing to be done...
Okay, I see your edit. I did have my code having only one digital io, but that was failing worse then this one is.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -

Last edited by wt200999 : 04-02-2008 at 22:48.