View Single Post
  #1   Spotlight this post!  
Unread 02-18-2011, 11:45 PM
JohnSchneider's Avatar
JohnSchneider JohnSchneider is offline
Registered User
FRC #3310 (Black Hawk Robotics)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Dallas
Posts: 777
JohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond reputeJohnSchneider has a reputation beyond repute
Unhappy 24V FESTO Solenoid Code

I am trying to finish up some last minute code for our robot and am at a loss for the 24V solenoid provided in the KOP (At least last year). Its double acting and I grasp how it works, but I cant find any documentation on how to program that partiucular solenoid.

I grasp the concept of saying

Solenoid s1 = new Solenoid(8,1);
Solenoid s2 = new Solenoid(8,2);

to initialize the two halves of the double solenoid (with 4 pins plugged into the I/O board)

But how to set which one turns on in code is bewildering to me...as it doesnt appear to be as easy as

if (buttonPressed == true)
{
s1.Set(0);
s2.Set(1);
}

else
{
s1.Set(1);
s2.Set(0);
}

Any pointers on what I'm doing wrong?
Reply With Quote