Banner Sensor Programming Problem
I am having some trouble with the Banner Sensors (for detecting the white reflective line). We have the Banner Sensors wired up as I have read here in the forums (white OR black for Data on RC, blue for ground, brown for +). We currently have 2 Sensors: Sensor #1 is plugged into RC Digital IO port 1, and Sensor #2 is plugged into RC Digital IO port 18 (we have to use port 1 and 18 because our pin-wire connector is too fat on one side). When we power on the robot (and neither banner sensor detects anything), rc_dig_in01 broadcasts 257, and rc_dig_in18 broadcasts 0. If Sensor #1 detects something, rc_dig_in01 accordingly broadcasts 1. However, if Sensor #2 detects something, instead of changing rc_dig_in18 to 1, it changes rc_dig_in01 to 256, and rc_dig_in18 stays at 0. rc_dig_in18 is ALWAYS broadcasting zero! If both sensors detect something, then rc_dig_in01 broadcasts 0. I'm fairly certain this is a programming problem, but I am lost. I have 'rc_dig_in18 = INPUT' set in the User_Initialization() function, but can rc_dig_in18 not be programmed for Input? In the default_routine, it reads
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
So, what's going on? Can rc_dig_in18 only be used for some kind of pressure switch? I'm lost.
|