View Single Post
  #3   Spotlight this post!  
Unread 16-02-2013, 20:04
ClockworkPirate ClockworkPirate is offline
Registered User
AKA: Mario Guerrieri
FRC #0670 (Homestead Robotics Team)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2012
Location: Sunnyvale, CA
Posts: 2
ClockworkPirate is an unknown quantity at this point
Re: Using Spike Relays in Java?

Quote:
Originally Posted by gixxy View Post
The Relay is hooked up to the Relay section on the Digital Sidecar (With the LED Recess).

Orange Light beens it is receiving no signal (or the kOff signal) which means it is powered.

In my code I usually don't use the direction part, I stick to:

Code:
Relay relay = new Relay(1); //Constructor
relay.set(Relay.Value.kForward); //Power flows Positive to Negative, light green
relay.set(Relay.Value.kOff); //No power flows, light orange
relay.set(Relay.Value.kReverse); //Power flows Negative to Positive, light red
We have our relays wired what seems to be correctly (PWMs from relay area on the sidecar, orange light), and my code is exactly like yours (besides variable names ), but the relays won't do anything. No matter what I call set() with (I've tried all four Relay.Value values), the light stays orange. What am I doing wrong?
Reply With Quote