View Single Post
  #4   Spotlight this post!  
Unread 08-02-2011, 23:31
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: 3 outputs for 2 booleans

Thats the hard to understand way. The easy way to do it is to build an array (Build Array) and then put that array into a number (Boolean Array to Number) then put that number into a case structure (that will change the true/false selector to a 0, Default/1 selector). Now it helps to know binary at this point. You right click the selector and add a case after. Do this until you have 4 cases (0, Default; 1; 2; and 3). If both booleans are off the case is 0 (false, false). If boolean 1 is on and 2 is off the case is 1 (true, false). If boolean 2 is on and 1 is off the case is 2 (false, true). If both are on the case is 3 (true, true). See the attached picture for wiring.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	26
Size:	7.7 KB
ID:	10034  
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote