View Single Post
  #3   Spotlight this post!  
Unread 03-02-2010, 21:29
KRibordy KRibordy is offline
Registered User
FRC #1000 (Cybearcats)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Valparaiso, IN
Posts: 36
KRibordy is an unknown quantity at this point
Re: Solenoid Breakouts?

I tried getting this to work today; I managed to get a green light on the solenoid breakout, but after defining the solenoid objects, using the Set() function did nothing.


Our code looks something like this.

Solenoid *solenoidOne;
Solenoid *solenoidTwo;

solenoidOne = new Solenoid(1);
solenoidTwo = new Solenoid(2);


Into operator code...

if(joystick->GetTrigger()) {
solenoidOne->Set(true);
solenoidTwo->Set(false);
}
else {
solenoidOne->Set(false);
solenoidTwo->Set(true);
}


I might be doing something completely wrong here. This our first year using pneumatics with the new control system, so I'm a bit confused. The code manages to get into the if statement, but the solenoid commands do nothing. Is there anything glaringly wrong that you can see?
Reply With Quote