View Single Post
  #2   Spotlight this post!  
Unread 18-02-2008, 12:38
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: IR sensor corruption help

If you're taking values incorrectly from the IR sensor, the fourth may be the last one being updated. The IR sensor returns zero if a button is hit and 1 if it is not. 0 is also the unattached value. I suggest first posting your code or shuffling the order of your ifs/cases and see if another button is being triggered. If the fourth button still triggers, your sensor may not be wired right.