View Single Post
  #3   Spotlight this post!  
Unread 08-02-2012, 07:26
dbeckwith's Avatar
dbeckwith dbeckwith is offline
Lead Programmer
AKA: Daniel Beckwith
FRC #3205 (The Patriots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: USA
Posts: 84
dbeckwith is an unknown quantity at this point
Re: Servo back and forth

It's pretty simple actually. You just use that triangular chooser and choose between 0 and 170 (which I believe is that max angle of the servos, not 180, but I could be wrong), then hook up that value to the Servo Set Angle. I think you just made it too complicated the way you did it, and the problem you had was you tried to perform a Boolean operation on two numbers at the bottom there.
__________________
q = (2*b) | ~(2*b);

if (life.getLemons() != null) this.lemonade = new Drink(life.getLemons());
else throw new NoLemonsException("What now?");