View Single Post
  #3   Spotlight this post!  
Unread 05-03-2013, 17:05
vhcook's Avatar
vhcook vhcook is online now
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: Multiple cases worry

It's generally not good practice to set the same motor in multiple places. When you tell the same motor to go forward and stop at the same time, it could do anything. And if someone presses buttons 4 and 5 at the same time, you're asking for full forward and full reverse at the same time.

To get your intended output, I would use two select statements (one triggered by each button) to produce one value to feed to a single Motor Set Output like Mark's example above. The logic being If Button4, then 1, elseif Button5 then -1, else 0.

Last edited by vhcook : 05-03-2013 at 17:07. Reason: Beat to the punch
Reply With Quote