Quote:
|
Originally Posted by sparksandtabs
what about sensing black/white?
|
You're trying to sense the colors black and white?
Are you trying to use the switch as part of an "encoder" (
link 1,
link 2) or are you trying to sense a black/white target? As in drive towards a black/white target and know the difference between the two.
You will still hook up the brown and blue as mentioned before, that won't change. Then decide between if you want to sense the white or the black color. This will decide which of the two remaining wires you will hook up to your input. You may have to experiment, depending on room lighting conditions, the distance between the sensor and the object (what the sensors rated for factors in here), and how the sensors adjusted (if adjustable) it may be able to pick up one color better than the other. You will have to switch input wires and try this out. Without really knowing what you're doing I don't see any reason to have both inputs from the switch. When it doesn't see the color you have it hooked up for it will assume the other, although this also depends on how you're programming it.