Hi,
I’m having problems getting values from the DIO ports. When I use the DigitalInput.get() method (in Java) it always returns false, even when we shortcut the port
Anyone else had this problem?
Thanks!
Hi,
I’m having problems getting values from the DIO ports. When I use the DigitalInput.get() method (in Java) it always returns false, even when we shortcut the port
Anyone else had this problem?
Thanks!
Can you post your code? It will be easier to debug that way.
Also, to clarify: by “shortcut the port”, do you mean to jumper the ground line to the signal line (the two outer pins) to each other, leaving the supply line (center pin) disconnected?
If so, we were having a problem with touch sensors on our lift face that may have had this issue. We had assumed that this was a problem in our code, but we back-burnered the problem because the touch sensors were getting beaten up too badly anyway as our driver practice picked up speed and moved on to things we are more likely to get working by Wednesday evening. I believe that programming will have use of the practice 'bot on Tuesday; I’ll see if we can work in a simple test to see if it’s perhaps a hardware issue.
we print the result of myDigital.get(); in the riolog
myDigital has been initialized as a Digital input in robotMap.java, and we tried with every port
GeeTwo:
I don’t think our switches are getting beaten up… we tried to press them manually, and we tested the with a multimeter to confirm that they work. The result is false, whatever pins are connected to each other in the port.
I didn’t think that was the problem with your switches; I was just explaining why we moved on rather than solve ours.
The test we came up with to verify electrical connection and switch function:
If you get those results, the problem is either with the 'RIO hardware or the software, or that the switch isn’t being mechanically activated.
The DIOs are sinking inputs. They should read high (True?) when open or not conncected. False when connected to 0 V. Connecting them to +3.3V or +5v reads the same as open.
Does the value change to true in Test mode?
Thanks GeeTwo we tried again and it seems to be working for some reason :ahh:
The whole system, or just the electrical end?
If it’s the whole system, it must be a Heisenberg effect - measuring the system causes it to change state ;->.