|
Are you sure that rc_sw1 gets set to 1 when the sensor "sees" a target? There are two signal wires (one black, one white) coming from the optical sensor; one will be 1 when the sensors sees something, the other will be 1 when it doesn't. Try a "debug? rc_sw1" and see what happens as you move a target in and out of its field of view.
|