View Single Post
  #5   Spotlight this post!  
Unread 03-02-2014, 12:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Post Re: Solenoid Breakout Code Help

Hint: surround your code with [ code] and [ /code] tags. It'll preserve whitespace that way.


Code:
	solenoidOne = new Solenoid(8,1);
	solenoidTwo = new Solenoid (8,8);
What do you expect these two lines to do? In particular, what is the first "8" supposed to represent?

Code:
		if(leftjoy.GetRawButton(Sol1)){
			solenoidOne->Set(true);
			solenoidTwo->Set(false);
		}
		else{
			solenoidOne->Set(false);
			solenoidTwo->Set(true);
		}
This looks like a job for a dual solenoid instead of two single solenoids.