Quote:
Originally Posted by Roger
WizenedEE: Maybe in the "robot world" the DIO ports aren't left floating, but when the wire is jumping into "Arduino world", would it need it's own de-floater resistor? I'm guessing at this.
|
Yes, this is what I was getting at.
I'm puzzled that when you used a resistor it the sensed value was always zero. 10K or 1K seems fine to use. Your code looks fine.
The one thing I noticed was that you split the wire coming from the cRIO DIO into an Arduino Ground and DIO pin. While electrically this will still work, the objective is really to split the Arduino pin to a Ground and a possible power/voltage source (the cRIO DIO wire/pin). That way the Arduino pin either gets electricity "sucked out of it" into the ground, or electricity "pushed into it" from the voltage source. In the second case, the resistor is there to give "preference" to the voltage source pushing electricity in, because
electricity follows the path of least resistance (and the voltage source path will only have a low-resistance wire).
I'm not sure what WizenedEE was talking about with the difference in grounds, but he may be on to something. What is trying to be accomplished with your suggested test, WizenedEE?