View Single Post
  #9   Spotlight this post!  
Unread 29-01-2008, 23:38
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,801
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 Programming

What Will said.

That code plays a little trick with the digital inputs and combines the four (0 or 1) inputs into a single four-digit binary number, where each digit represents one of the four digital inputs.
So the numbers you get are:
Code:
binary  decimal
0000      0
0001      1
0010      2
0100      4
1000      8
If you get any other number it means the digital inputs aren't connected correctly. For instance, if the IR board isn't connected at all you will get
Code:
binary  digital
1111     15
So that can help you to debug bad connections and see it on your OI display.

P.S. When you first use the OI Select button to switch to User Mode you'll see "u015" or something similar displayed for a couple of seconds. This is the Master Code version loaded on the Robot Controller.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 30-01-2008 at 09:31.