View Single Post
  #3   Spotlight this post!  
Unread 30-01-2004, 09:49
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,847
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: IR sensor trouble

Quote:
Originally Posted by D.Viddy
We are pretty sure that we have our IR sensor all hooked up right, but we are not getting a consistent output. When our sensor is pointed directly at the beacon (within 2 inches), we still get alot of 1s and not very many 0s. When we completely cover the sensor up, we get the same pattern. The only way the pattern stops is when we unplug the beacon. Is this normal output?
It depends on how you have the IR sensors hooked up.
If you are testing with just an IR sensor hooked to a digital input and a printf, then the output you are seeing is correct. As Al said the "bald" IR sensor will just tell you that the beacon is on in the room somewhere, and covering it with your hand won't prevent that.

Your next step is to shield the IR sensor so it isn't exposed on the sides or back and use Kevin Watson's Tracker s/w with the IR sensor handled by an interrupt. See Kevin's web site atr http://kevin.org/frc/ for his IR FAQ and software.

With the tracker s/w you won't be able to look at 1's and 0's at all. They should be hooked to the interrupts and a printf in an interrupt handler can play havoc with the code sequencing, because it can take so long. There are, however, other variables you can check to see that it's working correctly.

Look in the "Programming" forum for most IR discussions.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 30-01-2004 at 10:17.