Go to Post Most of us are pretty friendly. - StephLee [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 18-06-2015, 14:36
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Can't get Solenoid to fire?

Hi! We have spent many hours trying to get our Double Solenoid to work but all attempts have ultimately failed. We get green lights on the card in the CRIO slot showing us that it does have signal. The Solenoid is yellow on both sides and is 12V which is the voltage we are giving it. There is no clicking or any evidence the solenoid is bad or can't fire. We tried many other solenoids without luck. Any help will be greatly appreciated! Code:
Code:
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton; 


public class RobotTemplate extends SimpleRobot {
     private final Joystick DriverStick,other;                       //defines Axis Camera
     private final DoubleSolenoid s1;  
     RobotDrive myDrive;//defines solenoids
    private boolean orange;


    public RobotTemplate() {
          myDrive = new RobotDrive(3,2);
          DriverStick = new Joystick(1);            
          Compressor airCompressor;  
          airCompressor = new Compressor(14,7);
          airCompressor.start(); 
          other = new Joystick(2);
          s1 = new DoubleSolenoid(3,8);

     }
     public void operatorControl() {
         while (isOperatorControl() && isEnabled()){
               myDrive.tankDrive(other, DriverStick);
         
          if(DriverStick.getRawButton(1) == true)
          {
              
               s1.set(DoubleSolenoid.Value.kReverse);
           }
           if(DriverStick.getRawButton(2) == true)
           {
               
                s1.set(DoubleSolenoid.Value.kForward);
            }
           
         }
    }
    }
    

}
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi