I am having a quirky little issue where I have added a light sensor to the bot. (It is plugged into input #4) In the C code, I have set up the the IO ports as inputs and used the “Set_Number_of_Analog_Channels(FOUR_ANALOG)” statement so I could get analog in on input #4.
According to the ifi_aliases.h file, setting FOUR_ANALOG converts inputs #1 - #4 into analog inputs. All my limit switches are on #s 5-7.
Whenever I use: LightSensor=Get_Analog_Value(rc_ana_in04); all my other digital inputs read 0 and do not respond to the limit switches. (rc_dig_in## always returns zeros.) The light sensor reading comes in just fine. If I comment out the Get_Analog line, then all my digital inputs work fine.
Is there something I am missing in the configuration? Or do I need to execute a Get_Digital style subroutine to get my digital info back? (I am using the MPLAB and IFI programming environment for the VEX - very nice I must say.) I am very familiar with the PIC familiy of processors, but am hoping to not have to dig that deep.