I read that page. Interesting stuff, though a little hard to grasp at parts. The I/O was plugged in and getting readings from the button I had wired in.
This is my new code:
Code:
try {
if (Cypress.getButton(2)) {
Feed.setDirection(Relay.Direction.kForward);
} else if(Cypress.getButton(3)) {
Feed.setDirection(Relay.Direction.kReverse);
}
} catch (EnhancedIOException ex) {
ex.printStackTrace();
Feed.set(Relay.Value.kOff);
}
I have not tried this code yet so I will update the thread once I do test it. Is this what you were getting at? Also, do I need the "ex.printStackTrace();" line, I know it helps in debuging, but will the program run more efficently without it?