View Single Post
  #4   Spotlight this post!  
Unread 13-03-2014, 22:00
Pratik Kunapuli's Avatar
Pratik Kunapuli Pratik Kunapuli is offline
Probably browning-out on Astro-Turf
FRC #1648 (G3 Robotics)(EWCP)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Atlanta, GA
Posts: 143
Pratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to all
Re: Solenoid Breakout Board Problems?.?.?

Quote:
Originally Posted by mother_russia View Post
Hello, tonight is the night before my team's first competition. And for some f cking reason, the robot is still not ready. In addition to me not being able to troubleshoot my code, the inspectors came around and totally overrode our solenoid system. Now we wave to use a solenoid breakout board. I have no idea what the hell that is and how to program it. What is it and how could I program it. Any replies will be appreciated.
What wireties said above is definitely true. You need to use 2 pin cables, but as far as I know, you could also have the solenoid actuated from a spike, which would be powered from digital sidecar via PWM. If you want to continue using the solenoid breakout board, the code doesn't need to change that much. If you are using C++ or Java, you instantiate a new Solenoid (or double) with the parameters being which port the solenoid is plugged into the solenoid breakout board. I am not familiar with lab view, but maybe someone else can explain how to code it there. This would be an example:

Code:
//Single Solenoid
Solenoid piston = new Solenoid (portNumber);

//Double Solenoid
DoubleSolenoid piston2 = new DoubleSolenoid (portANumber, portBNumber);
Something worth noting is that actuating single and double solenoids in C++/Java are done in different ways. This is due to the fact that a double solenoid has no default position.

Code:
//Single Solenoid actuation 
piston.set(true);
piston.set(false);

//double solenoid actuation
piston2.set(DoubleSolenoid.Value.kForward);
piston2.set(DoubleSolenoid.Value.kReverse);
__________________
Official Driving Record: 101-59-0
2012-2015 Student 341 Miss Daisy
2015-Current Mentor 1648 G3 Robotics

Last edited by Pratik Kunapuli : 14-03-2014 at 08:21.