View Single Post
  #7   Spotlight this post!  
Unread 06-01-2003, 00:01
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Quote:
Originally posted by rbayer
One possible use for using both: safety. If you use both wires, the corresponding values in PBASIC should ALWAYS be opposite. If for some reason they aren't, you know an error occurred with the sensor. This also you to distinguish between a sensor that has come unplugged and one that just doesn't see anything.
Unfortunately this isn't necessarily true. We just verified earlier this week that all digital inputs are not sampled by the RC at the same time, so if you connect the sensor up like this it is possible that you will read both 1s or both 0s.

What we did to check this is to wire 8 digital inputs together to a momentary switch. We then modified our 2002 software to output the values of the switches using debug. Just manually flicking the switch by hand rapidly will result in one sample every few seconds that isn't 0xFF or 0x00, but is a random bit pattern.