Edu Robot Multiple Inputs

I am having some serious problems with our innovation first Edubot. For touch and IR sensors, we can get the code to work with one sensor just fine, but if we try and use two inputs then we get weird results. I was wondering if anyone else has experienced this same problem? If so, what did you do to fix it? if anything? Thanks for you help.

Check the initialization to make sure that the inputs you are using are, in fact, inputs.

I saw a similar problem when experimenting with sensors. the A/D converter uses a multiplexor. at each selection, the software must wait for the input to reach the voltage of each sensor. when using high impedance devices, the charge time takes longer.
I extended the wait time in the code, from 10 to 30 and the wierdness went away.

(see function Get_Analog_Value)

note, there is a warning in …

  • FILE NAME: ifi_utilities.c
  • USAGE:
  • The user should NOT modify this file, so that if a new version is released

Jerry W