View Single Post
  #2   Spotlight this post!  
Unread 13-01-2012, 17:35
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: not able to get any programs to work

Try these

Before class:
Code:
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Solenoid;

Use this:
In main class:

Code:
Relay r1;
Solenoid s1;
In robotInit:
Code:
r1 = new Relay(#); // What ever port its in replace #
s1 = new solenoid(#); // What ever port its in replace #
in operator control:
Code:
r1.set(Relay.Value.kOn); // kOff for off
s1.set(true);  //false for off

Last edited by ProgrammerMatt : 13-01-2012 at 17:40.
Reply With Quote